Skip to content

Commit

Permalink
add a location variable for kms
Browse files Browse the repository at this point in the history
  • Loading branch information
mkgharbi-aneo committed Dec 12, 2024
1 parent b9929a2 commit 56b0e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion infrastructure/quick-deploy/gcp/common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "google_compute_zones" "available" {}

data "google_kms_key_ring" "kms" {
name = var.kms.key_ring
location = var.region
location = coalesce(var.kms.location, var.region, "global")
}

data "google_kms_crypto_key" "kms" {
Expand Down
7 changes: 4 additions & 3 deletions infrastructure/quick-deploy/gcp/parameters.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ gke = {
]
}

kms = {
key_ring = "armonik-europe-west1"
crypto_key = "armonik-europe-west1"
kms = {
key_ring = "armonik" # Name the correct key ring
crypto_key = "armonik"
location = "europa-west1" # Modify to your location depending on where you are deploying
}

# Logging level
Expand Down
1 change: 1 addition & 0 deletions infrastructure/quick-deploy/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ variable "kms" {
type = object({
key_ring = string
crypto_key = string
location = optional(string)
})
}

Expand Down

0 comments on commit 56b0e19

Please sign in to comment.