aztfmod / rover

The rover is a docker container in charge of the deployment of the Terraform platform engineering for Azure
MIT License
175 stars 147 forks source link

Rover state list / show #322

Open gevraud opened 1 year ago

gevraud commented 1 year ago

Hello,

I am using rover version 1.4.6 and the execution of 'state list', 'state show' doesn't work anymore.

Here is the command I execute

rover -lz /tf/caf/landingzones/caf_solution -env xxx -level level3 -tfstate_subscription_id zzzz -tfstate snapshots.tfstate -target_subscription aaaa -var-folder /tf/caf/configuration/xxx/level3/elk/snapshots -a "state list"

It just doesn't do anything.

@calling_get_logged_user_object_id
 - AZURE_ENVIRONMENT: AzureCloud
 - ARM_ENVIRONMENT: public
Initalizing az cloud variables
 - logged in user objectId: xxxx (gevraud@xxx)
Initializing state with user: gevraudxxxx

launchpad: launchpad already installed

You can deploy a landingzone with the rover by running:
  rover -lz [landingzone_folder_name] -a [plan|apply|destroy|validate|refresh|graph|import|output|taint|untaint|'state list'|'state rm'|'state show']

@calling clean_up_variables
cleanup variables
clean_up backend_files

I feel it was working well in version 1.3.1.

Do I miss something / did the syntax change ?

Regards

chianw commented 1 year ago

I'm using aztfmod/rover:1.4.6-2307.2804 and tried to do the following:

rover -lz /tf/caf/landingzones/caf_launchpad \ -launchpad \ -var-folder /tf/caf/landingzones/caf_launchpad/scenario/100 \ -tfstate caf_launchpad.tfstate \ -tfstate_subscription_id xxxxx \ -target_subscription xxxxx \ -p ${TF_DATA_DIR}/caf_launchpad.tfstate -parallelism 30 \ -env sandpit \ -a "state list"

but it came back with an error

`Terraform state list return code: 1 Terraform returned errors: Error parsing command-line flags: flag provided but not defined: -var-file

Error 2003 on or near line 641: Error running terraform state list; exiting with status 2003

@calling clean_up_variables cleanup variables`

I tried with single quotes as well around 'state list' but the same results. Is this fixed in aztfmod/rover:1.4.6-2307.2804 ?