From c7756acbc9b3827e941e50b0a9b80749cd3188db Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Wed, 13 Nov 2019 09:29:33 -0800 Subject: [PATCH] =?UTF-8?q?Add=20improved=20for=5Feach=20non-module=20vari?= =?UTF-8?q?ant=20to=20project=20service=20upg=E2=80=A6=20(#2671)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/guides/version_3_upgrade.html.markdown | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 2e1f46c6b7fc..90aea41e8938 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -824,15 +824,15 @@ module "project_services" { #### New Config (google_project_service) ```hcl -resource "google_project_service" "project_iam" { - project = "your-project-id" - service = "iam.googleapis.com" - disable_on_destroy = false -} +resource "google_project_service" "service" { + for_each = toset([ + "iam.googleapis.com", + "cloudresourcemanager.googleapis.com", + ]) + + service = each.key -resource "google_project_service" "project_cloudresourcemanager" { project = "your-project-id" - service = "cloudresourcemanager.googleapis.com" disable_on_destroy = false } ```