Add Key Vault ID as a tag to virtual machines and enhance variable descriptions - #85
Merged
lixhunter merged 6 commits intoAug 19, 2025
Conversation
lixhunter
requested review from
Phil-Thoennissen,
neonwhiskers and
rswrz
as code owners
August 18, 2025 09:48
Phil-Thoennissen
previously approved these changes
Aug 18, 2025
lixhunter
force-pushed
the
OE-472-terraform-azurerm-vm-Add-Key-Vault-Resource-ID-as-Tag-to-Virtual-Machine
branch
from
August 19, 2025 09:21
e00f917 to
2548ddf
Compare
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
lixhunter
force-pushed
the
OE-472-terraform-azurerm-vm-Add-Key-Vault-Resource-ID-as-Tag-to-Virtual-Machine
branch
from
August 19, 2025 09:43
2548ddf to
1f469e0
Compare
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
…scriptions Signed-off-by: Andre Licht <al@cloudeteer.de>
rswrz
approved these changes
Aug 19, 2025
rswrz
left a comment
Contributor
There was a problem hiding this comment.
Nice work, thanks for implementing this enhancement.
lixhunter
deleted the
OE-472-terraform-azurerm-vm-Add-Key-Vault-Resource-ID-as-Tag-to-Virtual-Machine
branch
August 19, 2025 14:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request clarifies and enforces the relationship between the
key_vault_idandstore_secret_in_key_vaultvariables, ensures correct tagging behavior for virtual machines, and adds targeted tests for these behaviors. The changes improve both the documentation and the implementation to prevent misconfiguration and make the module's behavior more predictable.Variable validation and documentation improvements:
variables.tfto ensurekey_vault_idmust be set whenstore_secret_in_key_vaultistrueand must benullwhenstore_secret_in_key_vaultisfalse. Updated variable descriptions for bothkey_vault_idandstore_secret_in_key_vaultfor clarity. [1] [2]README.mdto clarify the relationship and requirements betweenkey_vault_idandstore_secret_in_key_vault. [1] [2]Tagging logic enhancements:
r-vm.tfto add thekey_vault_idas a tag to the virtual machine only when it is set, using a newlocal.tags_virtual_machinelocal value. Updated both Linux and Windows VM resources to use this logic. [1] [2] [3]Testing improvements:
input_key_vault_id.tftest.hclto verify that thekey_vault_idtag is only present when expected, and never present when it should not be.key_vault_id = nullwhenstore_secret_in_key_vault = false, ensuring test coverage for the new validation logic. [1] [2] [3]PR Checklist
breaking-change,feature,fix,other,ignore-releaseMotivation and Context
Breaking Changes