Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Issue #317 (submodule-fabric-net-svpc-access ) #329

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions modules/fabric-net-svpc-access/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
*/

resource "google_compute_shared_vpc_service_project" "projects" {
provider = google-beta

count = var.service_project_num
provider = google-beta
for_each = { for i, k in toset(var.service_project_ids) : k => i }
host_project = var.host_project_id
service_project = element(var.service_project_ids, count.index)
service_project = each.key
}

resource "google_compute_subnetwork_iam_binding" "network_users" {
Expand Down
4 changes: 3 additions & 1 deletion modules/fabric-net-svpc-access/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@

output "service_projects" {
description = "Project ids of the services with access to all subnets."
value = google_compute_shared_vpc_service_project.projects.*.service_project
value = [
for i, k in google_compute_shared_vpc_service_project.projects : k.service_project
]
}