Skip to content

Commit

Permalink
fix: correct access_config to block (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Sep 6, 2024
1 parent c0b5acf commit 1413f7e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1413f7e

Please sign in to comment.