aztfmod / aztfmod/rover

Unable to get correct syntax for -a param when command has a space - ie "state list"

Open
#297 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
176
Forks
147
PR merge metrics
No merged PRs in 30d

Description

ie if i pass
- 'state list'

it just shows state in the output and shows a usage message

tried "'state list'" and get

tf_action : ''state'

am calling from a github action workflow / job / step as per below

single word actions - like plan , validate work fine with same confired

name: Rover State List
env:
ARM_CLIENT_ID: ${{ steps.GetCredentials.outputs.client_id }}
ARM_CLIENT_SECRET: ${{ steps.GetCredentials.outputs.client_secret }}
run: |
echo "github_workspace : $GITHUB_WORKSPACE"
echo "CONFIG_PATH: ${{env.CONFIG_PATH }}"
if [ ${{ inputs.apply }} == "false" ]; then
echo "Running Rover Plan..."
az login --service-principal --username ${ARM_CLIENT_ID} --password ${ARM_CLIENT_SECRET} --tenant ${{ env.ARM_TENANT_ID }}
/tf/rover/rover.sh -lz /tf/caf/caf_solution \
-o /tf/caf/tf.plan \
-var-folder ${GITHUB_WORKSPACE}/${{env.CONFIG_PATH }} \
-tfstate_subscription_id ${{ env.TFSTATE_SUBSCRIPTION_ID }} \
-target_subscription ${{ env.ARM_SUBSCRIPTION_ID }} \
-tfstate ${{ env.TF_STATE }}.tfstate \
-level ${{ env.LEVEL }} \
-env ${{ env.ENVIRONMENT_TAG}} \
-a "'state show azurerm_network_security_group.nsg_obj'" \
${{ env.rover_vars }}
else
echo "A

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the GitHub Actions workflow shown in the issue and reproduce the spaced action passed to /tf/rover/rover.sh using -a. Read how rover.sh parses the -a argument and compare it with the working single-word actions; done means a command such as state show azurerm_network_security_group.nsg_obj is accepted without truncation or a usage message.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell, terraform
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.