Closed naeemdhby closed 1 year ago
Hi @arnaudlh , rover show command will read tfstate file output, so first need to do rover apply, and then do rover show. @onlyillusion I think would be a good idea to rover show also read tfplan file as well, for example, have a condition to read plan file if passed on as argument, otherwise read from tfstate file.
Hey, we need this parameter to create json files out off the tfplan files for infracost. it also a good option to read tfplan file as well.
I have modified your PR to make it working. Here the steps:
With the json file:
rover \
-lz /tf/caf/landingzones/caf_launchpad \
-var-folder /tf/caf/configuration/level0/launchpad \
-tfstate_subscription_id xxx \
-target_subscription xxx \
-tfstate caf_launchpad.tfstate \
-launchpad \
-level level0 \
-p ${TF_DATA_DIR}/caf_launchpad.tfstate.tfplan \
-o ${TF_DATA_DIR}/caf_launchpad.tfstate.tfplan.json \
-a show -json ${TF_DATA_DIR}/caf_launchpad.tfstate.tfplan
Without:
rover \
-lz /tf/caf/landingzones/caf_launchpad \
-var-folder /tf/caf/configuration/level0/launchpad \
-tfstate_subscription_id xxx \
-target_subscription xxx \
-tfstate caf_launchpad.tfstate \
-launchpad \
-level level0 \
-p ${TF_DATA_DIR}/caf_launchpad.tfstate.tfplan \
-a show ${TF_DATA_DIR}/caf_launchpad.tfstate.tfplan
hi @naeemdhby, can you add syntax examples please? I always get