Fix NLB naming for terraform and cloudformation targets

This commit is contained in:
Peter Rifel 2020-11-02 19:38:01 -06:00
parent e91ed11449
commit 0cd3854605
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
3 changed files with 4 additions and 4 deletions

View File

@ -1135,7 +1135,7 @@
"AWSElasticLoadBalancingV2LoadBalancerapicomplexexamplecom": {
"Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
"Properties": {
"Name": "api-complex-example-com",
"Name": "api-complex-example-com-vd3t5n",
"Scheme": "internet-facing",
"Subnets": [
{

View File

@ -452,7 +452,7 @@ resource "aws_lb" "api-complex-example-com" {
enable_cross_zone_load_balancing = true
internal = false
load_balancer_type = "network"
name = "api-complex-example-com"
name = "api-complex-example-com-vd3t5n"
subnets = [aws_subnet.us-test-1a-complex-example-com.id]
tags = {
"KubernetesCluster" = "complex.example.com"

View File

@ -654,7 +654,7 @@ type terraformNetworkLoadBalancerListenerAction struct {
func (_ *NetworkLoadBalancer) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *NetworkLoadBalancer) error {
nlbTF := &terraformNetworkLoadBalancer{
Name: *e.Name,
Name: *e.LoadBalancerName,
Internal: fi.StringValue(e.Scheme) == elbv2.LoadBalancerSchemeEnumInternal,
Type: elbv2.LoadBalancerTypeEnumNetwork,
Tags: e.Tags,
@ -732,7 +732,7 @@ type cloudformationNetworkLoadBalancerListenerAction struct {
func (_ *NetworkLoadBalancer) RenderCloudformation(t *cloudformation.CloudformationTarget, a, e, changes *NetworkLoadBalancer) error {
nlbCF := &cloudformationNetworkLoadBalancer{
Name: *e.Name,
Name: *e.LoadBalancerName,
Subnets: make([]*cloudformation.Literal, 0),
Type: elbv2.LoadBalancerTypeEnumNetwork,
Tags: buildCloudformationTags(e.Tags),