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

feat: data_source vault_transit_secret_backend_key #2327

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

simonostendorf
Copy link

@simonostendorf simonostendorf commented Sep 17, 2024

Description

Add vault_transit_secret_backend_key data source.

Closes #2326

Checklist

  • Added CHANGELOG entry (only for user-facing changes)
  • Acceptance tests where run against all supported Vault Versions

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccDataSourceTransitSecretKey'

everything ok

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

Copy link

hashicorp-cla-app bot commented Sep 17, 2024

CLA assistant check
All committers have signed the CLA.

@simonostendorf simonostendorf force-pushed the feat/data_source/vault_transit_secret_backend_key branch from ed8d5f2 to 859031f Compare September 17, 2024 13:06
@simonostendorf simonostendorf force-pushed the feat/data_source/vault_transit_secret_backend_key branch from 859031f to 2173beb Compare September 17, 2024 13:07
@simonostendorf simonostendorf requested a review from a team as a code owner November 20, 2024 06:59
Copy link
Contributor

@stevendpclark stevendpclark left a comment

Choose a reason for hiding this comment

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

A great start to this @simonostendorf, thanks!

I've added a comment about keys that are missing and we are also missing the associated documentation updates for the new data source.

ForceNew: true,
Description: "Name of the key.",
},
"type": {
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a few keys missing from this

  • auto_rotate_period
  • imported_key (it's listed as imported below)
  • latest_version
  • min_available_version

There are also a few optional keys depending on options set in the response returned see formatKeyPolicy

  • key_size is returned if set on creation
  • imported_key_allow_rotation is returned if imported_key is true
  • backup_info and restore_info are returned if the key was backed up/restored
  • kdf, kdf_mode, convergent_encryption and possibly convergent_encryption_version are returned if derived is true

Copy link
Author

Choose a reason for hiding this comment

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

There are a few keys missing from this

Sorry I used an old vault release without some of these keys and after testing it with the new version I forgot to add them.

@simonostendorf
Copy link
Author

A great start to this @simonostendorf, thanks!

I've added a comment about keys that are missing and we are also missing the associated documentation updates for the new data source.

Thanks for your review, after testing with the latest Vault version I noticed that there are no more key details in the api response. But that was the reason I wanted this data source. I can try to finish this PR, but I can not say how long it will take, because it can no longer fulfil my goal.

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.

[New Data Source]: vault_transit_secret_backend_key
2 participants