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_gcp_auth_backend_role create fails when backend uses nested mount path. #880

Closed
fore5fire opened this issue Oct 16, 2020 · 0 comments · Fixed by #1050
Closed

vault_gcp_auth_backend_role create fails when backend uses nested mount path. #880

fore5fire opened this issue Oct 16, 2020 · 0 comments · Fixed by #1050

Comments

@fore5fire
Copy link

Terraform Version

Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/google v3.43.0
+ provider registry.terraform.io/hashicorp/nomad v1.4.9
+ provider registry.terraform.io/hashicorp/vault v2.14.0

Affected Resource(s)

  • vault_gcp_auth_backend_role

Terraform Configuration Files

resource "vault_auth_backend" "gcp" {
  type = "gcp"
  path = "${var.env}/${var.region}/gpc"
}

resource "vault_gcp_auth_backend_role" "master" {
  role = "${var.playback_region}-${var.env}-master"
  type = "iam"

  backend                = vault_auth_backend.gcp.path
  bound_service_accounts = [var.master_service_account]
  token_policies         = [vault_policy.nomad_server.name]
}

Debug Output

https://gist.github.com/lsmith130/d763a5a0cd5b9ccf9a11da438e31613e

Panic Output

No crash

Expected Behavior

Should create a vault_gcp_auth_backend_role when backend uses a nested path.

Actual Behavior

terraform apply gave the error:

Error: invalid path "auth/test/usc1/gpc/role/usc1-test-master" for GCP auth backend role: Expected 4 parts in path 'auth/test/usc1/gpc/role/usc1-test-master'

Steps to Reproduce

  1. terraform apply

Important Factoids

None

References

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