-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CMK support for Base Workspace (#4161)
* added management key vault * added cmk for vmss and storage accounts * add default value for variables * add CMK for cosmos accounts * move tre-encryption key from mgmt to core * fix order of creation for encryption key * add cmk for the state store in mgmt * add support for external KV * revert CMK for cosmos - not working, need to redo this * refine comments and files names * remove redundant space * add space * upper case in comment * revert cosmos tags * update changelog + core version * remove unused var * remove redundant variable * remove redundant variables * add check for enable_cmk_encryption for the key_store_id variable in tf * bugfix: remove redundant data keyword * add enable_cmk_encryption check in module variables * remove redundant key_vault_id from ignore_changes for cmk * remove redundant sign/verify * add cmk support for cosmos db * update changelog + add comments * update core version * fix linting issue * add null provider to providers block * remove duplicates that were created by merge * update core version * remove redundant terraform data * Add support for CMK encryption in workspace configuration * add cmk for the ws storage accounts * fix encryption_identity being sent when cmk was disabled * update changelog * update changelog * fix linting issues * bump rp version * bump core version * update docs * use foreach for airlock cmks * update the porter upgrade command + minor version * change the default value for key_store_id variable to an empty string * set default value of key_store_id variable to null * Update default value of key_store_id variable to 'TWEAKME' * Remove default value for key_store_id variable in variables.tf * Set default value of key_store_id variable to an empty string in locals * update core version --------- Co-authored-by: Matthew Fortunka <[email protected]> Co-authored-by: Tim Allen <[email protected]>
- Loading branch information
1 parent
d718721
commit ac5787c
Showing
21 changed files
with
211 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.11.6" | ||
__version__ = "0.11.7" |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.9.4" | ||
__version__ = "0.9.5" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
resource "azurerm_user_assigned_identity" "encryption_identity" { | ||
count = var.enable_cmk_encryption ? 1 : 0 | ||
resource_group_name = azurerm_resource_group.ws.name | ||
location = azurerm_resource_group.ws.location | ||
tags = local.tre_workspace_tags | ||
|
||
name = "id-encryption-${var.tre_id}-${local.short_workspace_id}" | ||
|
||
lifecycle { ignore_changes = [tags] } | ||
} | ||
|
||
resource "azurerm_role_assignment" "kv_encryption_key_user" { | ||
count = var.enable_cmk_encryption ? 1 : 0 | ||
scope = var.key_store_id | ||
role_definition_name = "Key Vault Crypto Service Encryption User" | ||
principal_id = azurerm_user_assigned_identity.encryption_identity[0].principal_id | ||
} | ||
|
||
resource "azurerm_key_vault_key" "encryption_key" { | ||
count = var.enable_cmk_encryption ? 1 : 0 | ||
|
||
name = local.kv_encryption_key_name | ||
key_vault_id = var.key_store_id | ||
key_type = "RSA" | ||
key_size = 2048 | ||
|
||
key_opts = [ | ||
"decrypt", | ||
"encrypt", | ||
"unwrapKey", | ||
"wrapKey", | ||
] | ||
|
||
depends_on = [ | ||
azurerm_role_assignment.kv_encryption_key_user | ||
] | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.