Copilot-cli: Set CIDR values

Created on 12 Jul 2020  路  6Comments  路  Source: aws/copilot-cli

Is it possible to explicitly set the values for VpcCIDR, PublicSubnet1CIDR, PublicSubnet2CIDR, PrivateSubnet1CIDR and PrivateSubnet2CIDR in an environment?

The use case is an AWS implementation that leverages VPC peering so needs to control the CIDR for VPC's.

I can see the variables in templates/environment/cf.yml, but i'm not yet Golang enough to establish if these values can be passed through by any mechanism (however undocumented).

I think setting these explicitly would be an advanced use case and as such not necessarily checked for validity or prompted for during an interactive environment creation.

If this is not currently possible, I think I could manage to to implement them in a PR as optional flags and I would be happy to do this work.

typfeature typrequest

Most helpful comment

Just to be clear; #740 talks about importing existing resources, but this request is to be able to set the CIDR to be used when the vpc and subnets are created by a copilot environment.

All 6 comments

Hi @chrissamcat!

Currently there is no way to set these values in an environment, but we're in the process of designing this feature (#740). Thanks for letting us know that the use case is for VPC peering.

We'll update this issue once we solidify how #740 looks and would love to hear your feedback on our proposal :)

Just to be clear; #740 talks about importing existing resources, but this request is to be able to set the CIDR to be used when the vpc and subnets are created by a copilot environment.

:wave: @chrissamcat

Just to make sure that I understand the request properly, does that mean you'd also want to be able to create a AWS::EC2::VPCPeeringConnection resource in a Copilot environment? besides being able to change the CIDR ranges

Thank you!

That wasn't an expectation that I had. I was hoping to be able to set the CIDR so that peering could be achieved manually afterwards.

Sounds good!

heya! This feature is now released 馃コ in v0.3.0, when you run copilot env init you can now choose to "Configure default resources" which allows you to specify CIDR ranges.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sundarnarasiman picture sundarnarasiman  路  3Comments

kohidave picture kohidave  路  3Comments

kohidave picture kohidave  路  4Comments

noahjahn picture noahjahn  路  3Comments

jaybauson picture jaybauson  路  3Comments