Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output in "Show Plan" When using terragrunt #1066

Open
pratik-ixfi opened this issue Mar 14, 2023 · 2 comments
Open

No output in "Show Plan" When using terragrunt #1066

pratik-ixfi opened this issue Mar 14, 2023 · 2 comments

Comments

@pratik-ixfi
Copy link

pratik-ixfi commented Mar 14, 2023

Hello i am using terragrunt so on Show output there is no output caputured so can anyone help me

   - name: Plan Terraform
      id: plan
      if: github.event_name == 'pull_request'
      working-directory: infra/config/pci/stage
      run: terragrunt run-all plan --terragrunt-non-interactive -no-color -input=false
      continue-on-error: true

    - name: Update Pull Request
      uses: actions/github-script@v6
      if: github.event_name == 'pull_request'
      env:
        PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        script: |
          const output = `#### Terraform Format and Style 🖌\`${{ needs.lint.outputs.output }}\`
          #### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
          #### Terraform Validation 🤖\`${{ needs.validate.outputs.output }}\`
          #### Terraform Plan 📖\`${{ steps.plan.outcome }}\`

          <details><summary>Show Plan</summary>

          \`\`\`\n
          ${process.env.PLAN}
          \`\`\`

          </details>

          *Pushed by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;

          github.rest.issues.createComment({
            issue_number: context.issue.number,
            owner: context.repo.owner,
            repo: context.repo.repo,
            body: output
          })
    
    - name: Terraform Plan Status
      if: steps.plan.outcome == 'failure'
      run: exit 1
@pratik-ixfi
Copy link
Author

Screenshot 2023-03-14 at 11 46 14 PM

@Killer2-O
Copy link

@palakag29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants