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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
PR delivers fix for module
vmseries
, which resolve following problem : after adding existing public IPs for one or more NICs, for the rest of the NICs code was creating ephemeral, external IPs.Motivation and Context
Customer opened an issue, in which:
In the lab it was checked following scenario, where in the example code for 1 VM-Series instead of creating public IPs:
terraform-google-vmseries-modules/examples/vpc_peering_common/example.tfvars
Lines 258 to 276 in f7ffbe0
there were reused existing IPs:
where
A1.B1.C1.D1
andA2.B2.C2.D2
represents some public IPs.After changing TFVARS, it was added
public_ip
in examplevpc_peering_common
:terraform-google-vmseries-modules/examples/vpc_peering_common/main.tf
Lines 140 to 145 in f7ffbe0
Then while after applying changes on already deployed infrastructure Terraform was adding empty access config for the 3 NIC, which shouldn't have public IP:
How Has This Been Tested?
Code was tested by changing module
vmseries
and applying examplevpc_peering_common
.Types of changes
Checklist