From 439c9977bf1bbcbcaf9553839a7c0b22e3387900 Mon Sep 17 00:00:00 2001 From: Parag Bhingre Date: Thu, 13 Oct 2022 13:57:24 -0700 Subject: [PATCH 1/3] chore: add description for creating Elastic IPs --- .../template/templates/environment/partials/nat-gateways.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/pkg/template/templates/environment/partials/nat-gateways.yml b/internal/pkg/template/templates/environment/partials/nat-gateways.yml index 9b6762a3ea8..7b190e192df 100644 --- a/internal/pkg/template/templates/environment/partials/nat-gateways.yml +++ b/internal/pkg/template/templates/environment/partials/nat-gateways.yml @@ -1,5 +1,7 @@ {{- range $ind, $cidr := .PrivateSubnetCIDRs}} NatGateway{{inc $ind}}Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #{{$ind}} for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment From 330fef16428d9c75ac6fba4f0210993478b7d297 Mon Sep 17 00:00:00 2001 From: Parag Bhingre Date: Thu, 13 Oct 2022 14:18:52 -0700 Subject: [PATCH 2/3] fix integ test --- .../testdata/environments/template-with-basic-manifest.yml | 4 ++++ .../template-with-custom-empty-security-group.yml | 4 ++++ .../environments/template-with-custom-security-group.yml | 4 ++++ .../environments/template-with-default-access-log-config.yml | 4 ++++ .../template-with-imported-certs-observability.yml | 4 ++++ .../template/templates/environment/partials/nat-gateways.yml | 2 +- 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml index 42095000dd3..6130c23bfd7 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml @@ -480,6 +480,8 @@ Resources: SubnetId: !Ref PublicSubnet2 NatGateway1Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -515,6 +517,8 @@ Resources: RouteTableId: !Ref PrivateRouteTable1 SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml index 669b4efd734..668100e8afb 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml @@ -171,6 +171,8 @@ Resources: SubnetId: !Ref PublicSubnet2 NatGateway1Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -206,6 +208,8 @@ Resources: RouteTableId: !Ref PrivateRouteTable1 SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml index 0673cbe29d9..a47ab26a5d4 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml @@ -182,6 +182,8 @@ Resources: SubnetId: !Ref PublicSubnet2 NatGateway1Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -217,6 +219,8 @@ Resources: RouteTableId: !Ref PrivateRouteTable1 SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml index 3a051429693..33d1face947 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml @@ -537,6 +537,8 @@ Resources: SubnetId: !Ref PublicSubnet2 NatGateway1Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -572,6 +574,8 @@ Resources: RouteTableId: !Ref PrivateRouteTable1 SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml index 3541cd4ed09..b9079641612 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml @@ -181,6 +181,8 @@ Resources: SubnetId: !Ref PublicSubnet2 NatGateway1Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -216,6 +218,8 @@ Resources: RouteTableId: !Ref PrivateRouteTable1 SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: + Metadata: + 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/template/templates/environment/partials/nat-gateways.yml b/internal/pkg/template/templates/environment/partials/nat-gateways.yml index 7b190e192df..900a6e3d596 100644 --- a/internal/pkg/template/templates/environment/partials/nat-gateways.yml +++ b/internal/pkg/template/templates/environment/partials/nat-gateways.yml @@ -1,7 +1,7 @@ {{- range $ind, $cidr := .PrivateSubnetCIDRs}} NatGateway{{inc $ind}}Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #{{$ind}} for the NAT Gateway' + 'aws:copilot:description': 'Creating an Elastic IP #{{inc $ind}} for the NAT Gateway' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment From 50496e1ff111b7452618dad3b2605ce27a430255 Mon Sep 17 00:00:00 2001 From: Parag Bhingre Date: Thu, 13 Oct 2022 15:27:33 -0700 Subject: [PATCH 3/3] address feedback --- .../testdata/environments/template-with-basic-manifest.yml | 4 ++-- .../template-with-custom-empty-security-group.yml | 4 ++-- .../environments/template-with-custom-security-group.yml | 4 ++-- .../environments/template-with-default-access-log-config.yml | 4 ++-- .../template-with-imported-certs-observability.yml | 4 ++-- .../template/templates/environment/partials/nat-gateways.yml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml index 6130c23bfd7..c906eb6fd6a 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-basic-manifest.yml @@ -481,7 +481,7 @@ Resources: NatGateway1Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 1' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -518,7 +518,7 @@ Resources: SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 2' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml index 668100e8afb..333e6d8245f 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-empty-security-group.yml @@ -172,7 +172,7 @@ Resources: NatGateway1Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 1' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -209,7 +209,7 @@ Resources: SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 2' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml index a47ab26a5d4..3ad2b44dd8b 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-custom-security-group.yml @@ -183,7 +183,7 @@ Resources: NatGateway1Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 1' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -220,7 +220,7 @@ Resources: SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 2' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml index 33d1face947..5475b10cedb 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-default-access-log-config.yml @@ -538,7 +538,7 @@ Resources: NatGateway1Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 1' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -575,7 +575,7 @@ Resources: SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 2' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml index b9079641612..3170eaef594 100644 --- a/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml +++ b/internal/pkg/deploy/cloudformation/stack/testdata/environments/template-with-imported-certs-observability.yml @@ -182,7 +182,7 @@ Resources: NatGateway1Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #1 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 1' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment @@ -219,7 +219,7 @@ Resources: SubnetId: !Ref PrivateSubnet1 NatGateway2Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #2 for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway 2' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment diff --git a/internal/pkg/template/templates/environment/partials/nat-gateways.yml b/internal/pkg/template/templates/environment/partials/nat-gateways.yml index 900a6e3d596..69e87a979e9 100644 --- a/internal/pkg/template/templates/environment/partials/nat-gateways.yml +++ b/internal/pkg/template/templates/environment/partials/nat-gateways.yml @@ -1,7 +1,7 @@ {{- range $ind, $cidr := .PrivateSubnetCIDRs}} NatGateway{{inc $ind}}Attachment: Metadata: - 'aws:copilot:description': 'Creating an Elastic IP #{{inc $ind}} for the NAT Gateway' + 'aws:copilot:description': 'An Elastic IP for NAT Gateway {{inc $ind}}' Type: AWS::EC2::EIP Condition: CreateNATGateways DependsOn: InternetGatewayAttachment