diff --git a/controllers/ingress/group_controller.go b/controllers/ingress/group_controller.go index cf43ce320..a693b03d7 100644 --- a/controllers/ingress/group_controller.go +++ b/controllers/ingress/group_controller.go @@ -51,7 +51,7 @@ func NewGroupReconciler(cloud aws.Cloud, k8sClient client.Client, eventRecorder enhancedBackendBuilder := ingress.NewDefaultEnhancedBackendBuilder(k8sClient, annotationParser, authConfigBuilder) referenceIndexer := ingress.NewDefaultReferenceIndexer(enhancedBackendBuilder, authConfigBuilder, logger) trackingProvider := tracking.NewDefaultProvider(ingressTagPrefix, config.ClusterName) - elbv2TaggingManager := elbv2deploy.NewDefaultTaggingManager(cloud.ELBV2(), logger) + elbv2TaggingManager := elbv2deploy.NewDefaultTaggingManager(cloud.ELBV2(), cloud.VpcID(), logger) modelBuilder := ingress.NewDefaultModelBuilder(k8sClient, eventRecorder, cloud.EC2(), cloud.ACM(), annotationParser, subnetsResolver, diff --git a/controllers/service/service_controller.go b/controllers/service/service_controller.go index 404db5b02..bc6b65217 100644 --- a/controllers/service/service_controller.go +++ b/controllers/service/service_controller.go @@ -40,7 +40,7 @@ func NewServiceReconciler(cloud aws.Cloud, k8sClient client.Client, eventRecorde annotationParser := annotations.NewSuffixAnnotationParser(serviceAnnotationPrefix) trackingProvider := tracking.NewDefaultProvider(serviceTagPrefix, config.ClusterName) - elbv2TaggingManager := elbv2.NewDefaultTaggingManager(cloud.ELBV2(), logger) + elbv2TaggingManager := elbv2.NewDefaultTaggingManager(cloud.ELBV2(), cloud.VpcID(), logger) modelBuilder := service.NewDefaultModelBuilder(annotationParser, subnetsResolver, vpcResolver, trackingProvider, elbv2TaggingManager, config.ClusterName, config.DefaultTags, config.ExternalManagedTags, config.DefaultSSLPolicy) stackMarshaller := deploy.NewDefaultStackMarshaller() diff --git a/pkg/deploy/elbv2/tagging_manager.go b/pkg/deploy/elbv2/tagging_manager.go index 12f6785a9..14e029935 100644 --- a/pkg/deploy/elbv2/tagging_manager.go +++ b/pkg/deploy/elbv2/tagging_manager.go @@ -92,11 +92,11 @@ type TaggingManager interface { } // NewDefaultTaggingManager constructs default TaggingManager. -func NewDefaultTaggingManager(elbv2Client services.ELBV2, logger logr.Logger) *defaultTaggingManager { +func NewDefaultTaggingManager(elbv2Client services.ELBV2, vpcID string, logger logr.Logger) *defaultTaggingManager { return &defaultTaggingManager{ - elbv2Client: elbv2Client, - logger: logger, - + elbv2Client: elbv2Client, + vpcID: vpcID, + logger: logger, describeTagsChunkSize: defaultDescribeTagsChunkSize, } } @@ -106,9 +106,9 @@ var _ TaggingManager = &defaultTaggingManager{} // default implementation for TaggingManager // @TODO: use AWS Resource Groups Tagging API to optimize this implementation once it have PrivateLink support. type defaultTaggingManager struct { - elbv2Client services.ELBV2 - logger logr.Logger - + elbv2Client services.ELBV2 + vpcID string + logger logr.Logger describeTagsChunkSize int } @@ -235,20 +235,23 @@ func (m *defaultTaggingManager) ListLoadBalancers(ctx context.Context, tagFilter return nil, err } - lbARNs := make([]string, 0, len(lbs)) - lbByARN := make(map[string]*elbv2sdk.LoadBalancer, len(lbs)) + lbARNsWithinVPC := make([]string, 0, len(lbs)) + lbByARNWithinVPC := make(map[string]*elbv2sdk.LoadBalancer, len(lbs)) for _, lb := range lbs { + if awssdk.StringValue(lb.VpcId) != m.vpcID { + continue + } lbARN := awssdk.StringValue(lb.LoadBalancerArn) - lbARNs = append(lbARNs, lbARN) - lbByARN[lbARN] = lb + lbARNsWithinVPC = append(lbARNsWithinVPC, lbARN) + lbByARNWithinVPC[lbARN] = lb } - tagsByARN, err := m.describeResourceTags(ctx, lbARNs) + tagsByARN, err := m.describeResourceTags(ctx, lbARNsWithinVPC) if err != nil { return nil, err } var matchedLBs []LoadBalancerWithTags - for _, arn := range lbARNs { + for _, arn := range lbARNsWithinVPC { tags := tagsByARN[arn] matchedAnyTagFilter := false for _, tagFilter := range tagFilters { @@ -259,7 +262,7 @@ func (m *defaultTaggingManager) ListLoadBalancers(ctx context.Context, tagFilter } if matchedAnyTagFilter { matchedLBs = append(matchedLBs, LoadBalancerWithTags{ - LoadBalancer: lbByARN[arn], + LoadBalancer: lbByARNWithinVPC[arn], Tags: tags, }) } @@ -274,20 +277,23 @@ func (m *defaultTaggingManager) ListTargetGroups(ctx context.Context, tagFilters return nil, err } - tgARNs := make([]string, 0, len(tgs)) - tgByARN := make(map[string]*elbv2sdk.TargetGroup, len(tgs)) + tgARNsWithinVPC := make([]string, 0, len(tgs)) + tgByARNWithinVPC := make(map[string]*elbv2sdk.TargetGroup, len(tgs)) for _, tg := range tgs { + if awssdk.StringValue(tg.VpcId) != m.vpcID { + continue + } tgARN := awssdk.StringValue(tg.TargetGroupArn) - tgARNs = append(tgARNs, tgARN) - tgByARN[tgARN] = tg + tgARNsWithinVPC = append(tgARNsWithinVPC, tgARN) + tgByARNWithinVPC[tgARN] = tg } - tagsByARN, err := m.describeResourceTags(ctx, tgARNs) + tagsByARN, err := m.describeResourceTags(ctx, tgARNsWithinVPC) if err != nil { return nil, err } var matchedTGs []TargetGroupWithTags - for _, arn := range tgARNs { + for _, arn := range tgARNsWithinVPC { tags := tagsByARN[arn] matchedAnyTagFilter := false for _, tagFilter := range tagFilters { @@ -298,7 +304,7 @@ func (m *defaultTaggingManager) ListTargetGroups(ctx context.Context, tagFilters } if matchedAnyTagFilter { matchedTGs = append(matchedTGs, TargetGroupWithTags{ - TargetGroup: tgByARN[arn], + TargetGroup: tgByARNWithinVPC[arn], Tags: tags, }) } diff --git a/pkg/deploy/elbv2/tagging_manager_test.go b/pkg/deploy/elbv2/tagging_manager_test.go index 653fdfaac..b084fdf3f 100644 --- a/pkg/deploy/elbv2/tagging_manager_test.go +++ b/pkg/deploy/elbv2/tagging_manager_test.go @@ -226,6 +226,7 @@ func Test_defaultTaggingManager_ReconcileTags(t *testing.T) { m := &defaultTaggingManager{ elbv2Client: elbv2Client, + vpcID: "vpc-xxxxxxx", logger: &log.NullLogger{}, describeTagsChunkSize: defaultDescribeTagsChunkSize, } @@ -265,7 +266,7 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { wantErr error }{ { - name: "2/3 loadBalancers matches single tagFilter", + name: "2/3 loadBalancers matches single tagFilter; 0 loadBalancers filtered out on VPC ID", fields: fields{ describeLoadBalancersAsListCalls: []describeLoadBalancersAsListCall{ { @@ -273,12 +274,15 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { resp: []*elbv2sdk.LoadBalancer{ { LoadBalancerArn: awssdk.String("lb-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { LoadBalancerArn: awssdk.String("lb-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { LoadBalancerArn: awssdk.String("lb-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, }, }, @@ -343,14 +347,14 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { }, want: []LoadBalancerWithTags{ { - LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-1")}, + LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-1"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA1", "keyB": "valueB1", }, }, { - LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-3")}, + LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-3"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA3", "keyB": "valueB3", @@ -359,7 +363,7 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { }, }, { - name: "0/3 loadBalancers matches single tagFilter", + name: "1/3 loadBalancers matches single tagFilter; 1 loadBalancer filtered out on VPC ID", fields: fields{ describeLoadBalancersAsListCalls: []describeLoadBalancersAsListCall{ { @@ -367,12 +371,156 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { resp: []*elbv2sdk.LoadBalancer{ { LoadBalancerArn: awssdk.String("lb-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { LoadBalancerArn: awssdk.String("lb-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { LoadBalancerArn: awssdk.String("lb-3"), + VpcId: awssdk.String("vpc-aaaaaaa"), + }, + }, + }, + }, + describeTagsWithContextCalls: []describeTagsWithContextCall{ + { + req: &elbv2sdk.DescribeTagsInput{ + ResourceArns: awssdk.StringSlice([]string{"lb-1", "lb-2"}), + }, + resp: &elbv2sdk.DescribeTagsOutput{ + TagDescriptions: []*elbv2sdk.TagDescription{ + { + ResourceArn: awssdk.String("lb-1"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA1"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB1"), + }, + }, + }, + { + ResourceArn: awssdk.String("lb-2"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA2"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB2"), + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + tagFilters: []tracking.TagFilter{ + { + "keyA": {"valueA1", "valueA3"}, + }, + }, + }, + want: []LoadBalancerWithTags{ + { + LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-1"), VpcId: awssdk.String("vpc-xxxxxxx")}, + Tags: map[string]string{ + "keyA": "valueA1", + "keyB": "valueB1", + }, + }, + }, + }, + { + name: "1/3 loadBalancers matches single tagFilter; 2 loadBalancers filtered out on VPC ID", + fields: fields{ + describeLoadBalancersAsListCalls: []describeLoadBalancersAsListCall{ + { + req: &elbv2sdk.DescribeLoadBalancersInput{}, + resp: []*elbv2sdk.LoadBalancer{ + { + LoadBalancerArn: awssdk.String("lb-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + { + LoadBalancerArn: awssdk.String("lb-2"), + VpcId: awssdk.String("vpc-yyyyyyy"), + }, + { + LoadBalancerArn: awssdk.String("lb-3"), + VpcId: awssdk.String("vpc-aaaaaaa"), + }, + }, + }, + }, + describeTagsWithContextCalls: []describeTagsWithContextCall{ + { + req: &elbv2sdk.DescribeTagsInput{ + ResourceArns: awssdk.StringSlice([]string{"lb-1"}), + }, + resp: &elbv2sdk.DescribeTagsOutput{ + TagDescriptions: []*elbv2sdk.TagDescription{ + { + ResourceArn: awssdk.String("lb-1"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA1"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB1"), + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + tagFilters: []tracking.TagFilter{ + { + "keyA": {"valueA1", "valueA3"}, + }, + }, + }, + want: []LoadBalancerWithTags{ + { + LoadBalancer: &elbv2sdk.LoadBalancer{LoadBalancerArn: awssdk.String("lb-1"), VpcId: awssdk.String("vpc-xxxxxxx")}, + Tags: map[string]string{ + "keyA": "valueA1", + "keyB": "valueB1", + }, + }, + }, + }, + { + name: "0/3 loadBalancers matches single tagFilter; 0 loadBalancers filtered out on VPC ID", + fields: fields{ + describeLoadBalancersAsListCalls: []describeLoadBalancersAsListCall{ + { + req: &elbv2sdk.DescribeLoadBalancersInput{}, + resp: []*elbv2sdk.LoadBalancer{ + { + LoadBalancerArn: awssdk.String("lb-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + { + LoadBalancerArn: awssdk.String("lb-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + { + LoadBalancerArn: awssdk.String("lb-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, }, }, @@ -452,6 +600,7 @@ func Test_defaultTaggingManager_ListLoadBalancers(t *testing.T) { m := &defaultTaggingManager{ elbv2Client: elbv2Client, + vpcID: "vpc-xxxxxxx", describeTagsChunkSize: defaultDescribeTagsChunkSize, } got, err := m.ListLoadBalancers(context.Background(), tt.args.tagFilters...) @@ -491,7 +640,7 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { wantErr error }{ { - name: "2/3 targetGroups matches single tagFilter", + name: "2/3 targetGroups matches single tagFilter; 0 targetGroups filtered out on VPC ID", fields: fields{ describeTargetGroupsAsListCalls: []describeTargetGroupsAsListCall{ { @@ -499,12 +648,15 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { resp: []*elbv2sdk.TargetGroup{ { TargetGroupArn: awssdk.String("tg-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, }, }, @@ -569,14 +721,155 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { }, want: []TargetGroupWithTags{ { - TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-1")}, + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-1"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA1", "keyB": "valueB1", }, }, { - TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-3")}, + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-3"), VpcId: awssdk.String("vpc-xxxxxxx")}, + Tags: map[string]string{ + "keyA": "valueA3", + "keyB": "valueB3", + }, + }, + }, + }, + { + name: "1/3 targetGroups matches single tagFilter; 1 targetGroup filtered out on VPC ID", + fields: fields{ + describeTargetGroupsAsListCalls: []describeTargetGroupsAsListCall{ + { + req: &elbv2sdk.DescribeTargetGroupsInput{}, + resp: []*elbv2sdk.TargetGroup{ + { + TargetGroupArn: awssdk.String("tg-1"), + VpcId: awssdk.String("vpc-yyyyyyy"), + }, + { + TargetGroupArn: awssdk.String("tg-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + { + TargetGroupArn: awssdk.String("tg-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + }, + }, + }, + describeTagsWithContextCalls: []describeTagsWithContextCall{ + { + req: &elbv2sdk.DescribeTagsInput{ + ResourceArns: awssdk.StringSlice([]string{"tg-2", "tg-3"}), + }, + resp: &elbv2sdk.DescribeTagsOutput{ + TagDescriptions: []*elbv2sdk.TagDescription{ + { + ResourceArn: awssdk.String("tg-2"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA2"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB2"), + }, + }, + }, + { + ResourceArn: awssdk.String("tg-3"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA3"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB3"), + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + tagFilters: []tracking.TagFilter{ + { + "keyA": {"valueA1", "valueA3"}, + }, + }, + }, + want: []TargetGroupWithTags{ + { + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-3"), VpcId: awssdk.String("vpc-xxxxxxx")}, + Tags: map[string]string{ + "keyA": "valueA3", + "keyB": "valueB3", + }, + }, + }, + }, + { + name: "1/3 targetGroups matches single tagFilter; 2 targetGroups filtered out on VPC ID", + fields: fields{ + describeTargetGroupsAsListCalls: []describeTargetGroupsAsListCall{ + { + req: &elbv2sdk.DescribeTargetGroupsInput{}, + resp: []*elbv2sdk.TargetGroup{ + { + TargetGroupArn: awssdk.String("tg-1"), + VpcId: awssdk.String("vpc-yyyyyyy"), + }, + { + TargetGroupArn: awssdk.String("tg-2"), + VpcId: awssdk.String("vpc-ccccccc"), + }, + { + TargetGroupArn: awssdk.String("tg-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), + }, + }, + }, + }, + describeTagsWithContextCalls: []describeTagsWithContextCall{ + { + req: &elbv2sdk.DescribeTagsInput{ + ResourceArns: awssdk.StringSlice([]string{"tg-3"}), + }, + resp: &elbv2sdk.DescribeTagsOutput{ + TagDescriptions: []*elbv2sdk.TagDescription{ + { + ResourceArn: awssdk.String("tg-3"), + Tags: []*elbv2sdk.Tag{ + { + Key: awssdk.String("keyA"), + Value: awssdk.String("valueA3"), + }, + { + Key: awssdk.String("keyB"), + Value: awssdk.String("valueB3"), + }, + }, + }, + }, + }, + }, + }, + }, + args: args{ + tagFilters: []tracking.TagFilter{ + { + "keyA": {"valueA1", "valueA3"}, + }, + }, + }, + want: []TargetGroupWithTags{ + { + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-3"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA3", "keyB": "valueB3", @@ -585,7 +878,7 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { }, }, { - name: "0/3 targetGroups matches single tagFilter", + name: "0/3 targetGroups matches single tagFilter; 0 targetGroups filtered out on VPC ID", fields: fields{ describeTargetGroupsAsListCalls: []describeTargetGroupsAsListCall{ { @@ -593,12 +886,15 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { resp: []*elbv2sdk.TargetGroup{ { TargetGroupArn: awssdk.String("tg-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, }, }, @@ -672,15 +968,19 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { resp: []*elbv2sdk.TargetGroup{ { TargetGroupArn: awssdk.String("tg-1"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-2"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-3"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, { TargetGroupArn: awssdk.String("tg-4"), + VpcId: awssdk.String("vpc-xxxxxxx"), }, }, }, @@ -761,21 +1061,21 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { }, want: []TargetGroupWithTags{ { - TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-1")}, + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-1"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA1", "keyB": "valueB1", }, }, { - TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-2")}, + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-2"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA2", "keyB": "valueB2", }, }, { - TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-4")}, + TargetGroup: &elbv2sdk.TargetGroup{TargetGroupArn: awssdk.String("tg-4"), VpcId: awssdk.String("vpc-xxxxxxx")}, Tags: map[string]string{ "keyA": "valueA4", "keyB": "valueB4", @@ -798,6 +1098,7 @@ func Test_defaultTaggingManager_ListTargetGroups(t *testing.T) { m := &defaultTaggingManager{ elbv2Client: elbv2Client, + vpcID: "vpc-xxxxxxx", describeTagsChunkSize: defaultDescribeTagsChunkSize, } got, err := m.ListTargetGroups(context.Background(), tt.args.tagFilters...) @@ -961,6 +1262,7 @@ func Test_defaultTaggingManager_describeResourceTags(t *testing.T) { m := &defaultTaggingManager{ elbv2Client: elbv2Client, + vpcID: "vpc-xxxxxxx", describeTagsChunkSize: 2, } got, err := m.describeResourceTags(context.Background(), tt.args.arns) diff --git a/pkg/deploy/stack_deployer.go b/pkg/deploy/stack_deployer.go index 7bdec54e9..4c2420587 100644 --- a/pkg/deploy/stack_deployer.go +++ b/pkg/deploy/stack_deployer.go @@ -29,7 +29,7 @@ func NewDefaultStackDeployer(cloud aws.Cloud, k8sClient client.Client, trackingProvider := tracking.NewDefaultProvider(tagPrefix, config.ClusterName) ec2TaggingManager := ec2.NewDefaultTaggingManager(cloud.EC2(), networkingSGManager, cloud.VpcID(), logger) - elbv2TaggingManager := elbv2.NewDefaultTaggingManager(cloud.ELBV2(), logger) + elbv2TaggingManager := elbv2.NewDefaultTaggingManager(cloud.ELBV2(), cloud.VpcID(), logger) return &defaultStackDeployer{ cloud: cloud,