custom zone not working
steps
- create new app with
copilot app init - create new env with
copilot env initand set 3 zones as explained in https://aws.github.io/copilot-cli/docs/developing/custom-environment-resources/
expected
- you should see a VPC with 3 zones
instead
- the usual 2 zones are there but not the 3 as configured in env initialization
From the steps you've posted it's not failing any deployments and simply not creating the third AZ, correct? Can you post the manifest that copilot created from running copilot env init here?
thanks @CaptainCarpensir . I've double-checked and didn't realise that even if I was providing the correct 3 IPs, the (existing) manifest was not being updated... Creating a new environment did the trick.
Ah this makes sense! I recreated this issue and it's definitely a bug so I'm reopening this so we can fix it.
Steps to recreate:
- Run
copilot env initto create an env manifest, leave resources as is - Run
copilot env deleteand delete the stack, this still leaves the manifest - Run
copilot env initagain, but provision a third AZ (or rather any change that would reflect in the manifest)
If you do this, the manifest won't reflect the changes because it reads that the manifest already exists so it skips writing it. One option to handle this is by prompting the user if they'd like to overwrite the manifest if the user picks "Yes, but I'd like to configure the default resources" or "No, I'd like to import existing resources" when one already exists.