aztfmod / rovergo

The next version of Rover, the command line tool for Azure CAF Landingzones. Developed in Go
MIT License
10 stars 7 forks source link

rover cd destroy doesn't work #69

Closed sebastus closed 3 years ago

sebastus commented 3 years ago

I tried it a couple of ways:

rover cd destroy rover lp destroy -c $HOME/caf_config/demo/level0 -s $HOME/git/caf-terraform-landingzones -l level0

This may be due to the fact that I changed some things in caf_config. As follows:

resource_groups = { level0 = { name = "lp-l0" tags = { level = "level0" } } ... etc

sebastus commented 3 years ago

I deleted my launch pad manually, then re-installed with a caf_config in which I changed nothing. Immediately after rover lp apply, did a rover lp destroy and it worked normally.

benc-uk commented 3 years ago

We need to look into cd destroy.

it seems to be working fine for me, but without a --level it will try to destroy all levels BUT starting with the launchpad which of course will nuke all remote state causing all other destroy to fail. Probably just need to run it in reverse

benc-uk commented 3 years ago

Running cd destroy -c samples/ref-app/symphony.yml --level level1 (with levels 1 through 4) works fine.

BUT running this cd destroy -c samples/ref-app/symphony.yml --level level0 failed for me with Error: variable "landingzone" was required but not supplied

My hunch is for landingzone destroy we DON'T need the var files appended, but launchpad destroy does because it it's running with local state

I suggest we change the title of this issue as it's not specific to cd command

benc-uk commented 3 years ago

I just had an error in my config. PR #72 puts checks in place which would have caught this

The deletion in reverse issue still holds