Skip to content

feat: optional delete of build key vault secret - #645

Open
amarkdotdev wants to merge 1 commit into
hashicorp:mainfrom
amarkdotdev:feat/build-key-vault-secret-delete
Open

feat: optional delete of build key vault secret#645
amarkdotdev wants to merge 1 commit into
hashicorp:mainfrom
amarkdotdev:feat/build-key-vault-secret-delete

Conversation

@amarkdotdev

Copy link
Copy Markdown

Summary

  • Add build_key_vault_secret_delete (bool) config option
  • When true and build_key_vault_name is set, delete the certificate secret during step cleanup via the Key Vault data-plane API
  • Docs + unit tests for cleanup behavior

Fixes #506

Test plan

  • go test ./builder/azure/arm/ -run StepCertificateInKeyVault
  • Acceptance: Windows build with build_key_vault_name + build_key_vault_secret_delete = true and confirm secret is removed after build

Add build_key_vault_secret_delete so builds that use an externally
supplied build_key_vault_name can remove the certificate secret on
cleanup, avoiding unbounded secret version growth.

Fixes hashicorp#506

Signed-off-by: Aaron Mark <amark@g.jct.ac.il>
@amarkdotdev
amarkdotdev marked this pull request as ready for review August 18, 2026 19:08
@amarkdotdev
amarkdotdev requested a review from a team as a code owner August 18, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to delete secret when build_key_vault_name is supplied

1 participant