Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

fix(module/vmseries): Reuse of existing public IP for 1 NIC caused creating ephemeral IPs for other NICs #232

Merged
merged 2 commits into from
Dec 19, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/multi_nic_common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}
1 change: 1 addition & 0 deletions examples/vmseries_ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}

Expand Down
1 change: 1 addition & 0 deletions examples/vpc_peering_common/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}

Expand Down
1 change: 1 addition & 0 deletions examples/vpc_peering_common_with_autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module "autoscale" {
{
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
metadata = merge(
try(each.value.bootstrap_options, {}),
Expand Down
1 change: 1 addition & 0 deletions examples/vpc_peering_common_with_network_tags/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}

Expand Down
1 change: 1 addition & 0 deletions examples/vpc_peering_dedicated/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module "vmseries" {
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
private_ip = v.private_ip
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
}

Expand Down
1 change: 1 addition & 0 deletions examples/vpc_peering_dedicated_with_autoscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ module "autoscale" {
{
subnetwork = module.vpc[v.vpc_network_key].subnetworks[v.subnetwork_key].self_link
create_public_ip = try(v.create_public_ip, false)
public_ip = try(v.public_ip, null)
}]
metadata = merge(
try(each.value.bootstrap_options, {}),
Expand Down
2 changes: 1 addition & 1 deletion modules/vmseries/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ locals {
nat_ip = try(v.public_ip, google_compute_address.public[k].address, null)
public_ptr_domain_name = try(v.public_ptr_domain_name, google_compute_address.public[k].public_ptr_domain_name, null)
}
if can(v.public_ip) || local.create_public_ip[k]
if try(v.public_ip, null) != null || local.create_public_ip[k]
}
}

Expand Down