From 1413f7ea46f38e15956a0ae3054ee554ef70c5df Mon Sep 17 00:00:00 2001 From: Andrew Peabody Date: Fri, 6 Sep 2024 11:40:18 -0700 Subject: [PATCH] fix: correct access_config to block (#209) --- main.tf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 7139081..41b9085 100644 --- a/main.tf +++ b/main.tf @@ -90,8 +90,16 @@ resource "google_compute_instance_from_template" "bastion_vm" { network_interface { subnetwork = var.subnet subnetwork_project = var.host_project != "" ? var.host_project : var.project - access_config = var.external_ip ? var.access_config : null network_ip = var.network_ip + + dynamic "access_config" { + for_each = var.external_ip ? var.access_config : [] + content { + nat_ip = access_config.value["nat_ip"] + public_ptr_domain_name = access_config.value["public_ptr_domain_name"] + network_tier = access_config.value["network_tier"] + } + } } source_instance_template = module.instance_template.self_link