-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow storage account's system assigned identity use CMK #155
base: main
Are you sure you want to change the base?
Allow storage account's system assigned identity use CMK #155
Conversation
🦋 Changeset detectedLatest commit: 039d3c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
98994f5
to
b1e46e4
Compare
e6e8181
to
7f81396
Compare
0ad1ad1
to
039d3c4
Compare
}) | ||
description = "(Optional) Customer managed key to use for encryption. Currently type can only be set to 'kv'." | ||
default = { enabled = false, key_name = null } | ||
description = "(Optional) Customer managed key to use for encryption. Currently type can only be set to 'kv'. If the key vault is in the same account, and key_name is not set, the key and relevant permissions will be automatically created." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tenant
rather than account
?
# tfsec:ignore:azure-keyvault-ensure-key-expiry | ||
resource "azurerm_key_vault_key" "key" { | ||
for_each = (local.cmk_flags.kv && var.customer_managed_key.key_name == null ? toset(["kv"]) : toset([])) | ||
name = "${replace("${module.naming_convention.prefix}-st-${module.naming_convention.suffix}", "-", "")}-cmk-kv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of a format like io-p-itn-<domain>-[<app_name>]-st-cmk-01
? I took it from the current PEP format as io-p-itn-wallet-sql-pep-01
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I might have already asked - what are these storage accounts? why do they use managed identities? what key do they use? |
List of changes
Allow the storage account's system assigned identity to use the CMK without a user assigned one
Creating the customer managed key kv key automatically
Adding relevant permissions to the right managed identity to use the customer managed key
Allow the usage of pre-existing key vault keys as customer managed keys
Motivation and context
Some storage accounts that are being migrated from WEU to ITN make use of the system assigned managed identity for CMK setup
Type of changes
Does this introduce a change to production resources with possible user impact?
Other information