Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMS Key -- Policy contains a statement with one or more invalid principals #205

Open
Niyphelah opened this issue Apr 22, 2024 · 0 comments

Comments

@Niyphelah
Copy link

When attempting to deploy the master branch with 'terraform apply' I am experiencing the following:

Error: creating KMS Key: MalformedPolicyDocumentException: Policy contains a statement with one or more invalid principals.

I believe this is due to the hard-coded "account_id" in this file on line 22.

While troubleshooting, I discovered this existing issue under the Terraform AWS EKS module. It specifies that this module must be deployed under a role rather than a user. I attempted to create a role with administrative permissions and assume this role, but I continued to receive an error when attempting to create the KMS key.

I further attempted to replace this hard coded "account_id" with the ARN of the role which I was trying to assume. This yielded the same result.

There is no W&B documentation regarding the creation of the role. I reviewed both the documentation available on docs.wandb.ai and within the README.txt of the terraform-aws-wandb repo.

I tried utilizing both the main.tf in the public-dns-external and public-dns-with-route53 examples and in the master branch.

Version info:

wandb v4.7.2
Terraform v1.8.1
on linux_amd64

  • provider registry.terraform.io/hashicorp/aws v4.67.0
  • provider registry.terraform.io/hashicorp/cloudinit v2.3.3
  • provider registry.terraform.io/hashicorp/helm v2.13.1
  • provider registry.terraform.io/hashicorp/kubernetes v2.29.0
  • provider registry.terraform.io/hashicorp/local v2.5.1
  • provider registry.terraform.io/hashicorp/random v3.6.1
  • provider registry.terraform.io/hashicorp/tls v4.0.5
  • provider registry.terraform.io/terraform-aws-modules/http v2.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant