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

vault_aws_secret_backend_role: role_arns conflicts with policy_arns while it should not #709

Closed
adongy opened this issue Mar 17, 2020 · 1 comment · Fixed by #710
Closed

Comments

@adongy
Copy link
Contributor

adongy commented Mar 17, 2020

Terraform Version

Terraform v0.12.23

Affected Resource(s)

  • vault_aws_secret_backend_role

Terraform Configuration Files

resource "vault_aws_secret_backend_role" "ecr" {
  backend         = vault_aws_secret_backend.aws.path
  name            = "ecr"
  credential_type = "assumed_role"

  role_arns = [
    "arn:aws:iam::${local.account_id}:role/${local.role-name}",
  ]

  policy_arns = [
    "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
  ]
}

Expected Behavior

Plan runs successfully, as well as apply.

Actual Behavior


Error: "policy_arns": conflicts with role_arns

  on aws-secret.tf line 47, in resource "vault_aws_secret_backend_role" "ecr":
  47: resource "vault_aws_secret_backend_role" "ecr" {



Error: "role_arns": conflicts with policy_arns

  on aws-secret.tf line 47, in resource "vault_aws_secret_backend_role" "ecr":
  47: resource "vault_aws_secret_backend_role" "ecr" {


Steps to Reproduce

Please list the steps required to reproduce the issue:

  1. terraform plan

References

@adongy
Copy link
Contributor Author

adongy commented Mar 17, 2020

As an aside, the old attribute names policy_arn, policy could get cleaned up (although that would require a major version bump as per https://www.terraform.io/docs/extend/best-practices/deprecations.html) to simplify the resource schema.

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

Successfully merging a pull request may close this issue.

1 participant