-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add allowed_uri_sans_template #10249
Conversation
Following! This is a feature we really want to use, I spent the morning trying to make something work and then saw this PR 👍 |
Exactly what I have been looking for. @pbohman Do you want to rebase the PR? |
This PR requires hashicorp/vault#10249 to be merged. One test is right failing until the feature is released in vault. The following test shall pass when teh feature lands on vault ```bash TESTARGS="-run TestPkiSecretBackendRole" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test $(go list ./...) -v -run TestPkiSecretBackendRole -timeout 20m ? github.com/hashicorp/terraform-provider-vault [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/coverage [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/generate [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/codegen (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/generated [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/helper [no test files] ? github.com/hashicorp/terraform-provider-vault/schema [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/util (cached) [no tests to run] === RUN TestPkiSecretBackendRole_basic resource_pki_secret_backend_role_test.go:16: Step 2/2 error: Check failed: Check 19/47 error: vault_pki_secret_backend_role.test: Attribute 'allowed_uri_sans_template' expected "true", got "false" --- FAIL: TestPkiSecretBackendRole_basic (4.00s) FAIL FAIL github.com/hashicorp/terraform-provider-vault/vault 4.255s FAIL make: *** [testacc] Error 1 ```
This PR requires hashicorp/vault#10249 to be merged. One test is right failing until the feature is released in vault. The following test shall pass when teh feature lands on vault ```bash TESTARGS="-run TestPkiSecretBackendRole" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test $(go list ./...) -v -run TestPkiSecretBackendRole -timeout 20m ? github.com/hashicorp/terraform-provider-vault [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/coverage [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/generate [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/codegen (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/generated [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/helper [no test files] ? github.com/hashicorp/terraform-provider-vault/schema [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/util (cached) [no tests to run] === RUN TestPkiSecretBackendRole_basic resource_pki_secret_backend_role_test.go:16: Step 2/2 error: Check failed: Check 19/47 error: vault_pki_secret_backend_role.test: Attribute 'allowed_uri_sans_template' expected "true", got "false" --- FAIL: TestPkiSecretBackendRole_basic (4.00s) FAIL FAIL github.com/hashicorp/terraform-provider-vault/vault 4.255s FAIL make: *** [testacc] Error 1 ```
@pbohman hey Pete, thanks for your contribution. Do you want to rebase the PR and resolve the merge conflict? |
Enables identity templating for the allowed_uri_sans field in PKI cert roles. Implemented as suggested in hashicorp#8509
0131f8b
to
9ee3d83
Compare
This PR requires hashicorp/vault#10249 to be merged. One test is right failing until the feature is released in vault. The following test shall pass when teh feature lands on vault ```bash TESTARGS="-run TestPkiSecretBackendRole" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test $(go list ./...) -v -run TestPkiSecretBackendRole -timeout 20m ? github.com/hashicorp/terraform-provider-vault [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/coverage [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/generate [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/codegen (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/generated [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/helper [no test files] ? github.com/hashicorp/terraform-provider-vault/schema [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/util (cached) [no tests to run] === RUN TestPkiSecretBackendRole_basic resource_pki_secret_backend_role_test.go:16: Step 2/2 error: Check failed: Check 19/47 error: vault_pki_secret_backend_role.test: Attribute 'allowed_uri_sans_template' expected "true", got "false" --- FAIL: TestPkiSecretBackendRole_basic (4.00s) FAIL FAIL github.com/hashicorp/terraform-provider-vault/vault 4.255s FAIL make: *** [testacc] Error 1 ```
@hsimon-hashicorp Any chance that this could be prioritized? |
@harsimranmaan Thanks for bubbling this up! I'll get a reviewer as soon as I can. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Howdy @pbohman, thanks for the contribution! This looks functionally great. In order to get this merged in, can we get a changelog entry (changelog/10249.txt
)?
Also, if we can get a documentation update PR (a new PR is fine), if it's needed, that'd be great :) |
@schultz-is, @hsimon-hashicorp, @harsimranmaan, thanks for the review and pushing this forward. The changelog and docs have been updated. |
Thanks for contributing this, @pbohman! |
This PR requires hashicorp/vault#10249 to be merged. One test is right failing until the feature is released in vault. The following test shall pass when teh feature lands on vault ```bash TESTARGS="-run TestPkiSecretBackendRole" make testacc ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test $(go list ./...) -v -run TestPkiSecretBackendRole -timeout 20m ? github.com/hashicorp/terraform-provider-vault [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/coverage [no test files] ? github.com/hashicorp/terraform-provider-vault/cmd/generate [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/codegen (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/generated [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/decode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/datasources/transform/encode (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/alphabet (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/role (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/template (cached) [no tests to run] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/generated/resources/transform/transformation (cached) [no tests to run] ? github.com/hashicorp/terraform-provider-vault/helper [no test files] ? github.com/hashicorp/terraform-provider-vault/schema [no test files] testing: warning: no tests to run PASS ok github.com/hashicorp/terraform-provider-vault/util (cached) [no tests to run] === RUN TestPkiSecretBackendRole_basic resource_pki_secret_backend_role_test.go:16: Step 2/2 error: Check failed: Check 19/47 error: vault_pki_secret_backend_role.test: Attribute 'allowed_uri_sans_template' expected "true", got "false" --- FAIL: TestPkiSecretBackendRole_basic (4.00s) FAIL FAIL github.com/hashicorp/terraform-provider-vault/vault 4.255s FAIL make: *** [testacc] Error 1 ```
* Add allowed_uri_sans_template Enables identity templating for the allowed_uri_sans field in PKI cert roles. Implemented as suggested in hashicorp#8509 * changelog++ * Update docs with URI SAN templating
Thanks for adding this ❤️ We just ran into this issue at @monzo trying to template spiffe:// SANs. Any chance we could get this released as a new tag? 🙏 |
Enables identity templating for the allowed_uri_sans field in PKI cert roles.
Implemented as suggested in #8509