Skip to content

chore: retrofit --allow-vpc-ingress flag to manifest#3763

Merged
mergify[bot] merged 11 commits intoaws:mainlinefrom
Lou1415926:env/manifest/internal-alb-ingress
Jul 18, 2022
Merged

chore: retrofit --allow-vpc-ingress flag to manifest#3763
mergify[bot] merged 11 commits intoaws:mainlinefrom
Lou1415926:env/manifest/internal-alb-ingress

Conversation

@Lou1415926
Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.

@Lou1415926 Lou1415926 requested a review from a team as a code owner July 14, 2022 00:53
@Lou1415926 Lou1415926 requested review from huanjani and removed request for a team July 14, 2022 00:53
"github.com/stretchr/testify/require"
)

func TestCloudFormation_UpgradeEnvironment(t *testing.T) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These shouldn't be part of the change after I'm able to rebase on #3758.

Copy link
Copy Markdown
Contributor

@paragbhingre paragbhingre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have one concern otherwise looks good to me.

Certificates []string `yaml:"certificates,omitempty"`
InternalALBSubnets []string `yaml:"subnets,omitempty"`
Certificates []string `yaml:"certificates,omitempty"`
SecurityGroupsConfig securityGroupsConfig `yaml:"security_groups,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to bring to your notice that my PR to add security_group to env manifest also have similar secuirty_group field in the vpc.
I was just concerned about having the same naming with just extra s at the end of security_groups will be little confusing for the customers. What do you think about this?

Copy link
Copy Markdown
Contributor Author

@Lou1415926 Lou1415926 Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to read

http:
   private:
      security_groups: # configs for the sg used on internal ALB

Whereas yours iirc would be

security_group:
   # environmentsg configs

so I guess we're probably fine!!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are correct. I was just making sure that 2 almost similar parameters shouldn't be confusing to the customers. But as you said they read differently in different sections should be okay.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to https://github.com/aws/copilot-cli/pull/3737/files#diff-4c63a9ce04347fa71ffd19988ac84f3eca7aacf36c414bb9e8f95c011b0f622dR327 . it is just from_cdn won't be valid for private.

http:
  public:
    security_groups:
      ingress:
        from_cdn: true

PrivateImportedCertARNs: e.importPrivateCertARNs(),
VPCConfig: e.vpcConfig(),
CustomInternalALBSubnets: e.internalALBSubnets(),
AllowVPCIngress: e.in.AllowVPCIngress, // TODO(jwh): fetch AllowVPCIngress from Manifest or SSM.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to remove AllowVPCIngress from e.in?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't because we need to feed from e.in to manifest for env show --manifest

type: Environment
observability: {container_insights: true}
http: {public: {certificates: [cert-1, cert-2]}}
http: {public: {certificates: [cert-1, cert-2]}, private: {security_groups: {allow_vpc_ingress: true}}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do

http:
  private:
    security_groups:
      ingress:
        allow_vpc: true

Certificates []string `yaml:"certificates,omitempty"`
InternalALBSubnets []string `yaml:"subnets,omitempty"`
Certificates []string `yaml:"certificates,omitempty"`
SecurityGroupsConfig securityGroupsConfig `yaml:"security_groups,omitempty"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to https://github.com/aws/copilot-cli/pull/3737/files#diff-4c63a9ce04347fa71ffd19988ac84f3eca7aacf36c414bb9e8f95c011b0f622dR327 . it is just from_cdn won't be valid for private.

http:
  public:
    security_groups:
      ingress:
        from_cdn: true

Copy link
Copy Markdown
Contributor

@paragbhingre paragbhingre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🎉

@mergify mergify Bot merged commit f7ebf2f into aws:mainline Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants