Merge pull request #10158 from rifelpet/nlb-name

Fix NLB naming for terraform and cloudformation targets
This commit is contained in:
Kubernetes Prow Robot 2020-11-02 19:58:15 -08:00 committed by GitHub
commit be5c344dce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

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

View File

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

View File

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