Skip to content

Commit

Permalink
Merge pull request #6 from memes/master
Browse files Browse the repository at this point in the history
Updates from field testing
  • Loading branch information
memes authored Mar 4, 2019
2 parents 2b3e4a9 + 34da505 commit 2ec917b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ output "project_id" {
value = "${google_project.project.project_id}"
}

# Export the subnets as a map of name to region
output "subnets" {
value = "${zipmap(google_compute_subnetwork.subnet.*.name, google_compute_subnetwork.subnet.*.region)}"
# Export the project number so it can be used elsewhere
output "project_number" {
value = "${google_project.project.number}"
}

# Export the service accounts as a map of account id to fully-qualified email
Expand Down
3 changes: 2 additions & 1 deletion service_account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "null_resource" "delete_default_service_account" {

triggers {
default_service_account = "${data.google_compute_default_service_account.default.id}"
activated_apis = "${join(",", var.enable_apis)}y"
activated_apis = "${join(",", var.enable_apis)}"
}

depends_on = ["google_project_service.api", "data.google_compute_default_service_account.default"]
Expand Down Expand Up @@ -60,6 +60,7 @@ data "null_data_source" "service_account_subnets" {
# can bind to just those subnets.
resource "google_compute_subnetwork_iam_member" "subnets" {
count = "${length(var.service_account_subnets)}"
provider = "google-beta"
region = "${lookup(data.null_data_source.service_account_subnets.*.outputs[count.index], "region")}"
subnetwork = "${lookup(data.null_data_source.service_account_subnets.*.outputs[count.index], "subnet")}"
project = "${local.service_account_network_project}"
Expand Down

0 comments on commit 2ec917b

Please sign in to comment.