terragrunt-action icon indicating copy to clipboard operation
terragrunt-action copied to clipboard

Error when redirecting tg command to file

Open thisurawijesekera opened this issue 1 year ago • 1 comments

Describe the bug Failed when trying to redirect tg command to file

To Reproduce When try to redirect tg_command output to a file

    - name: Run Terragrunt Plan Json output
      if: ${{ inputs.ACTION == 'plan' }}    
      uses: gruntwork-io/[email protected]
      with:
        tf_version: ${{ env.TERRAFORM_VERSION }}
        tg_version: ${{ env.TERRAGRUNT_VERSION }}
        tg_dir: vars/${{ env.ENVIRONMENT }}
        tg_command: 'show -json  output.tfplan > tfplan.json'

    - name: Run Terragrunt Plan txt output 
      if: ${{ inputs.ACTION == 'plan' }}    
      uses: gruntwork-io/[email protected]
      with:
        tf_version: ${{ env.TERRAFORM_VERSION }}
        tg_version: ${{ env.TERRAGRUNT_VERSION }}
        tg_dir: vars/${{ env.ENVIRONMENT }}
        tg_command: 'show --no-color  output.tfplan  2>&1 > tfplan.txt'

Expected behavior Should be able to redirect to a file. Can do it locally.

Nice to have

  • [ ] Terminal output image

Versions

  • Terragrunt Action version: v1.0.10
  • Environment details (Terragrunt version, Terraform version, etc.): TERRAFORM_VERSION: 1.6.5 TERRAGRUNT_VERSION: 0.53.8

thisurawijesekera avatar Nov 29 '23 11:11 thisurawijesekera