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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: d_gcp_auth_backend_role: error on nonexistent role #1184

Merged

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Oct 1, 2021

Ensure that an error is reported whenever the gcp-auth-backend-role data source does not exist in Vault.

Community Note

  • Please vote on this pull request by adding a 馃憤 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" comments, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

bug: data/gcp_auth_backend_role Report an error when attempting to access a nonexistent Vault role.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
make dev testacc TESTARGS='-run=TestAccGCPAuthBackendRoleDataSource -v' ; TZ=UTC date 
==> Checking that code complies with gofmt requirements...
go build -o terraform-provider-vault
mv terraform-provider-vault ~/.terraform.d/plugins/
TF_ACC=1 go test $(go list ./...) -v -run=TestAccGCPAuthBackendRoleDataSource -v -timeout 20m

[...]

=== RUN   TestAccGCPAuthBackendRoleDataSource_basic
--- PASS: TestAccGCPAuthBackendRoleDataSource_basic (4.92s)
=== RUN   TestAccGCPAuthBackendRoleDataSource_gce
--- PASS: TestAccGCPAuthBackendRoleDataSource_gce (3.97s)
=== RUN   TestAccGCPAuthBackendRoleDataSource_none
--- PASS: TestAccGCPAuthBackendRoleDataSource_none (0.49s)
PASS
ok      github.com/hashicorp/terraform-provider-vault/vault     10.111s
Fri Oct  1 19:27:52 UTC 2021

- ensure that an error is reported whenever the gcp-auth-backend-role
  data source does not exist in Vault.
@benashz benashz merged commit 0ac98a8 into main Oct 4, 2021
@benashz benashz deleted the VAULT-3662/d_source_gcp_auth_backend_role-handle-missing-role branch October 4, 2021 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants