Skip to content

fix: d_gcp_auth_backend_role: error on nonexistent role - #1184

Merged
benashz merged 1 commit into
mainfrom
VAULT-3662/d_source_gcp_auth_backend_role-handle-missing-role
Oct 4, 2021
Merged

fix: d_gcp_auth_backend_role: error on nonexistent role#1184
benashz merged 1 commit into
mainfrom
VAULT-3662/d_source_gcp_auth_backend_role-handle-missing-role

Conversation

@benashz

@benashz benashz commented Oct 1, 2021

Copy link
Copy Markdown
Collaborator

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.

4 participants