From 6d8f3f7e22f071b9a8e6ef77db3deb4339df6b5b Mon Sep 17 00:00:00 2001 From: Ludovico Magnocavallo Date: Thu, 16 Jun 2022 22:16:20 +0200 Subject: [PATCH] depend service account outputs on iam roles --- modules/iam-service-account/README.md | 12 ++++++------ modules/iam-service-account/outputs.tf | 13 +++++++++++-- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/iam-service-account/README.md b/modules/iam-service-account/README.md index ab6b1882c..fe07ddbff 100644 --- a/modules/iam-service-account/README.md +++ b/modules/iam-service-account/README.md @@ -62,11 +62,11 @@ module "myproject-default-service-accounts" { | name | description | sensitive | |---|---|:---:| | [email](outputs.tf#L17) | Service account email. | | -| [iam_email](outputs.tf#L25) | IAM-format service account email. | | -| [id](outputs.tf#L33) | Service account id. | | -| [key](outputs.tf#L38) | Service account key. | ✓ | -| [name](outputs.tf#L44) | Service account name. | | -| [service_account](outputs.tf#L49) | Service account resource. | | -| [service_account_credentials](outputs.tf#L54) | Service account json credential templates for uploaded public keys data. | | +| [iam_email](outputs.tf#L27) | IAM-format service account email. | | +| [id](outputs.tf#L37) | Service account id. | | +| [key](outputs.tf#L47) | Service account key. | ✓ | +| [name](outputs.tf#L53) | Service account name. | | +| [service_account](outputs.tf#L58) | Service account resource. | | +| [service_account_credentials](outputs.tf#L63) | Service account json credential templates for uploaded public keys data. | | diff --git a/modules/iam-service-account/outputs.tf b/modules/iam-service-account/outputs.tf index 4f0e0aa52..2823910bd 100644 --- a/modules/iam-service-account/outputs.tf +++ b/modules/iam-service-account/outputs.tf @@ -18,7 +18,9 @@ output "email" { description = "Service account email." value = local.resource_email_static depends_on = [ - local.service_account + local.service_account, + google_service_account_iam_binding.roles, + google_service_account_iam_member.additive ] } @@ -26,13 +28,20 @@ output "iam_email" { description = "IAM-format service account email." value = local.resource_iam_email_static depends_on = [ - local.service_account + local.service_account, + google_service_account_iam_binding.roles, + google_service_account_iam_member.additive ] } output "id" { description = "Service account id." value = local.service_account.id + depends_on = [ + local.service_account, + google_service_account_iam_binding.roles, + google_service_account_iam_member.additive + ] } output "key" {