copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

custom zone not working

Open sebastianovide opened this issue 2 years ago • 3 comments

steps

  1. create new app with copilot app init
  2. create new env with copilot env init and set 3 zones as explained in https://aws.github.io/copilot-cli/docs/developing/custom-environment-resources/

expected

  1. you should see a VPC with 3 zones

instead

  1. the usual 2 zones are there but not the 3 as configured in env initialization

sebastianovide avatar Nov 26 '23 15:11 sebastianovide

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?

CaptainCarpensir avatar Nov 27 '23 23:11 CaptainCarpensir

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.

sebastianovide avatar Nov 28 '23 09:11 sebastianovide

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:

  1. Run copilot env init to create an env manifest, leave resources as is
  2. Run copilot env delete and delete the stack, this still leaves the manifest
  3. Run copilot env init again, 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.

CaptainCarpensir avatar Nov 28 '23 19:11 CaptainCarpensir