Open
Description
Following the example setup where the outputs of Terraform Plan is added to the Pull Request as a comment. However there's all these ? type symbols that gets added in the comments.
versions:
hashicorp/setup-terraform@v2
actions/github-script@v6
my Github Actions YML File
# Generates an execution plan for Terraform
- name: Terraform Plan
id: plan
run: terraform plan -input=false
- uses: actions/github-script@v6
if: github.event_name == 'pull_request'
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
script: |
const 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
})`
My condensed Output:
terraform
eastus2/providers/Microsoft.Compute/virtualMachines/vm-1]�[0m
�[0m�[1mazurerm_virtual_machine_extension.ext[0]: Refreshing state... [id=/subscriptions/redacted/resourceGroups/rg-eastus2/providers/Microsoft.Compute/virtualMachines/vm-1/extensions/customscript]�[0m
�[0m�[1m�[32mNo changes.�[0m�[1m Your infrastructure matches the configuration.�[0m
�[0mTerraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.
`
Where do these question mark symbols come from. If I set my terraform plan to -no-color it'll remove the symbols. Is there any other work around?
Metadata
Metadata
Assignees
Labels
No labels