Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
feat: add depends_on for keyring to wait for api activation
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandoataoldotcom committed May 1, 2022
1 parent 9def7f6 commit 02dcaf4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kms.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ resource "google_kms_key_ring" "keyring" {
project = each.value.project_id
name = each.value.labels.environment
location = "global"

depends_on = [
google_project_service.activate_apis,
]
}

resource "google_kms_crypto_key" "key" {
Expand All @@ -17,5 +21,9 @@ resource "google_kms_crypto_key" "key" {
lifecycle {
prevent_destroy = true
}

depends_on = [
google_kms_key_ring.keyring,
]
}

0 comments on commit 02dcaf4

Please sign in to comment.