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

Add support for configuring a DB secret's plugin_name #1320

Merged
merged 11 commits into from
Jan 29, 2022

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Jan 26, 2022

This PR adds support for setting the plugin_name in the vault_database_secret_backend_connection resource. Previously all related resources could only be provisioned using a well known default value from 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

Closes #1288

Release note for CHANGELOG:


Output from acceptance testing:

make testacc TESTARGS='-v -test.run TestAccDatabaseSecretBackendConnection_mssql'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test -v -v -test.run TestAccDatabaseSecretBackendConnection_mssql -timeout 20m ./...

[...]

=== RUN   TestAccDatabaseSecretBackendConnection_mssql
--- PASS: TestAccDatabaseSecretBackendConnection_mssql (17.70s)

Copy link
Contributor

@vinay-gopalan vinay-gopalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Had 1 query about a test with a custom plugin name, but I'm good with the rest

Copy link
Contributor

@calvn calvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor nits, otherwise looks good! There's a bit of redundancy between the consts, the map, and the slice that we build, but we've discussed online that you plan on refactoring those bits separately.

* Use dbEngine instances in place of constants.

- replace the use of map for looking up dbEngine instances by name with
  a slice
- factor out dbBackend* constants to dbEngine instances.

* Use dbEngine names in db Schema fields.

* Add some public getter methods to the dbEngine
@benashz benashz merged commit 0d2c0e4 into main Jan 29, 2022
@benashz benashz deleted the VAULT-4703/add-db-plugin-name branch January 29, 2022 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

database_secret_backend_connection resource missing plugin_name field.
3 participants