Skip to content

Commit

Permalink
Add improved for_each non-module variant to project service upg… (#2671)
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Nov 13, 2019
1 parent 2843f2b commit c7756ac
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```
Expand Down

0 comments on commit c7756ac

Please sign in to comment.