Created
August 4, 2021 12:54
-
-
Save toricls/d45aa722e301510b82022b891be3cdb2 to your computer and use it in GitHub Desktop.
Copilot で App Runner サービスをデプロイしたいだけなのに `env init` で VPC が作られて悲しいので、とりあえず default VPC で無理矢理 `env init` を通してしまう図
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ defaultVpcId=$(aws ec2 describe-vpcs --region "${AWS_REGION}" \ | |
--filter Name=isDefault,Values=true | jq -r '.Vpcs[0].VpcId') | |
$ subnetIds=$(aws ec2 describe-subnets --region "${AWS_REGION}" \ | |
--filter Name=vpc-id,Values="${defaultVpcId}" \ | |
| jq -r '.Subnets | map (.SubnetId) | join(",")') | |
$ copilot env init \ | |
--name ops --profile "${AWS_PROFILE}" --region "${AWS_REGION}" \ | |
--import-vpc-id "${defaultVpcId}" --import-private-subnets "${subnetIds}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment