Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch-hamm committed Apr 30, 2024
1 parent 8eed92a commit b8b82bb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ locals {
}

#Ensure database_encryption_key_name is of the format <KEYRING_NAME>/cryptoKeys/<KEY_NAME>
kms_key_id = "projects/${var.project_id}/locations/${var.region}/keyRings/"
database_encryption = var.enable_database_encryption ? (var.database_encryption_key_name != "" ? [{"key_name": "${locals.kms_key_id}${var.database_encryption_key_name}", "state": "ENCRYPTED"}] : [{"key_name": google_kms_crypto_key.gke-encryption-key[0].id, "state": "ENCRYPTED"}]) : [{"key_name": "", "state": "DECRYPTED"}]
database_encryption = var.enable_database_encryption ? (var.database_encryption_key_name != "" ? [{"key_name": "projects/${var.project_id}/locations/${var.region}/keyRings/${var.database_encryption_key_name}", "state": "ENCRYPTED"}] : [{"key_name": google_kms_crypto_key.gke-encryption-key[0].id, "state": "ENCRYPTED"}]) : [{"key_name": "", "state": "DECRYPTED"}]
}

module "gke" {
Expand Down

0 comments on commit b8b82bb

Please sign in to comment.