From c09d133e0047d4b24c787058ccd919779a3c02f8 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 19:09:13 +0100 Subject: [PATCH 01/88] Added apply output --- action.yml | 12 +++++++++++- config/atmos_github_summary.yaml | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 631b7cd..6f3188e 100644 --- a/action.yml +++ b/action.yml @@ -289,7 +289,17 @@ runs: --output "${{ github.workspace }}/atmos-apply-summary.md" \ --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - + + TERRAFORM_OUTPUTS=$(terraform output --json | \ + jq -Mr 'to_entries | \ + map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] \ + | join(" ") \ + ) | \ + if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | \ + join("\n")' \ + ) + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md + cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY if [ $EXIT_CODE -eq 0 ]; then diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 2f85898..b2c55ca 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -69,6 +69,11 @@ terraform:
Terraform Apply Summary {{wrapCode .CombinedOutput}}
+ +
Terraform Outputs + %TERRAFORM_OUTPUTS% +
+ {{if ne .Vars.infracost_details_diff_breakdown ""}} {{template "infracost" .}} {{end}} From ff513475bea0310168a2e8a9c5e78d67090a40c2 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 20:45:35 +0100 Subject: [PATCH 02/88] Added test-workflows --- .github/workflows/integration-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index aea51d4..9766185 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -9,6 +9,7 @@ on: env: AWS_REGION: us-east-2 + # Permissions required for assuming AWS identity permissions: id-token: write @@ -28,6 +29,7 @@ jobs: terraform-state-table: ${{ secrets.TERRAFORM_STATE_TABLE }} terraform-state-role: ${{ secrets.TERRAFORM_STATE_ROLE }} terraform-plan-role: ${{ secrets.TERRAFORM_APPLY_ROLE }} + terraform-apply-role: ${{ secrets.TERRAFORM_APPLY_ROLE }} terraform-version: 1.5.2 aws-region: ${{ env.AWS_REGION }} sort-by: .stack_slug @@ -35,7 +37,7 @@ jobs: EOL - name: Plan Atmos Component - uses: cloudposse/github-action-atmos-terraform-plan@incapsulate-configs + uses: cloudposse/github-action-atmos-terraform-plan@v1 with: component: "foobar" stack: "plat-ue2-sandbox" From 31fd492655e69f9b464c24b30aa46f9da476b280 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 21:02:53 +0100 Subject: [PATCH 03/88] Added test-workflows --- .github/workflows/integration-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 9766185..4be3989 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -29,7 +29,6 @@ jobs: terraform-state-table: ${{ secrets.TERRAFORM_STATE_TABLE }} terraform-state-role: ${{ secrets.TERRAFORM_STATE_ROLE }} terraform-plan-role: ${{ secrets.TERRAFORM_APPLY_ROLE }} - terraform-apply-role: ${{ secrets.TERRAFORM_APPLY_ROLE }} terraform-version: 1.5.2 aws-region: ${{ env.AWS_REGION }} sort-by: .stack_slug @@ -42,6 +41,7 @@ jobs: component: "foobar" stack: "plat-ue2-sandbox" atmos-gitops-config-path: "${{ runner.temp }}/atmos-gitops.yaml" + test: runs-on: ubuntu-latest needs: setup From 0b376d29692b27614a02d3aeab63c0d7e2716f79 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:02:06 +0100 Subject: [PATCH 04/88] Added test-workflows --- action.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 6f3188e..34f5c83 100644 --- a/action.yml +++ b/action.yml @@ -290,14 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | \ - map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] \ - | join(" ") \ - ) | \ - if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | \ - join("\n")' \ - ) + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From b166f4503927e99efb5548a69c5b679740978f23 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:08:55 +0100 Subject: [PATCH 05/88] Added test-workflows --- tests/components/terraform/foobar/outputs.tf | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/components/terraform/foobar/outputs.tf diff --git a/tests/components/terraform/foobar/outputs.tf b/tests/components/terraform/foobar/outputs.tf new file mode 100644 index 0000000..1c8e8b8 --- /dev/null +++ b/tests/components/terraform/foobar/outputs.tf @@ -0,0 +1,4 @@ +output "result" { + description = "Test description output" + value = random_id.foo.id +} \ No newline at end of file From d333b062f3c81106f23f53e27af27df6829e81a7 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:09:37 +0100 Subject: [PATCH 06/88] Added test-workflows --- tests/components/terraform/foobar/outputs.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/components/terraform/foobar/outputs.tf b/tests/components/terraform/foobar/outputs.tf index 1c8e8b8..9f1b97e 100644 --- a/tests/components/terraform/foobar/outputs.tf +++ b/tests/components/terraform/foobar/outputs.tf @@ -1,4 +1,10 @@ output "result" { description = "Test description output" value = random_id.foo.id +} + +output "sensitive_value" { + description = "Test sensitive description output" + value = random_id.foo.id + sensitive = true } \ No newline at end of file From 65535a53fe2bc3b0cfb385aefbffe31ef40de118 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:15:04 +0100 Subject: [PATCH 07/88] Added test-workflows --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 34f5c83..9ce8f5e 100644 --- a/action.yml +++ b/action.yml @@ -291,6 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + echo "${TERRAFORM_OUTPUTS}" sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 929ba780b7b6af797016616cb9dc9292601300a0 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:18:00 +0100 Subject: [PATCH 08/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9ce8f5e..f4654f8 100644 --- a/action.yml +++ b/action.yml @@ -292,7 +292,7 @@ runs: TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') echo "${TERRAFORM_OUTPUTS}" - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 0c1997e8751f7e6b96047896aad8adf8f6491074 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:20:51 +0100 Subject: [PATCH 09/88] Added test-workflows --- action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/action.yml b/action.yml index f4654f8..217f419 100644 --- a/action.yml +++ b/action.yml @@ -291,8 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - echo "${TERRAFORM_OUTPUTS}" - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/%TERRAFORM_OUTPUTS%/TEST TEST/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From c7c38db4b39409ce0ec95cb1945ac2a214215fe9 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:25:07 +0100 Subject: [PATCH 10/88] Added test-workflows --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 217f419..de30a33 100644 --- a/action.yml +++ b/action.yml @@ -290,8 +290,8 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - sed -i "s/%TERRAFORM_OUTPUTS%/TEST TEST/" ${{ github.workspace }}/atmos-apply-summary.md + TERRAFORM_OUTPUTS=$(terraform output --json | jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 490156eb8a325fc19e803d25c2eed42ae4d59668 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:31:30 +0100 Subject: [PATCH 11/88] Added test-workflows --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index de30a33..4f03710 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,8 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/" ${{ github.workspace }}/atmos-apply-summary.md + echo "${TERRAFORM_OUTPUTS}" + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 5d27ce39c19c336888b75cc749607f86f06f84ad Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:36:03 +0100 Subject: [PATCH 12/88] Added test-workflows --- action.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 4f03710..7a7609e 100644 --- a/action.yml +++ b/action.yml @@ -290,9 +290,8 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - echo "${TERRAFORM_OUTPUTS}" - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/\n}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 0074a5ab6a552dd6d1a6d1cfabf26cd7497ed85c Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:38:29 +0100 Subject: [PATCH 13/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 7a7609e..80296c7 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/\n}/g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/\\n}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From ea4b71eb9b1fb9d26fed9db8540af846a9b89892 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:51:52 +0100 Subject: [PATCH 14/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 80296c7..4724125 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/\\n}/g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 26ea10cfe09263361fe4da423302a072bc6d4620 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:55:20 +0100 Subject: [PATCH 15/88] Added test-workflows --- README.md | 51 ++++++++++++++++++++++++++++++++ action.yml | 2 +- config/atmos_github_summary.yaml | 2 ++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 37c8c73..b1d3640 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,57 @@ specific language governing permissions and limitations under the License. ``` + +## Apply Succeeded for `foobar` in `plat-ue2-sandbox` + + + +
+ + +[![apply](https://shields.io/badge/APPLY-SUCCESS-success?style=for-the-badge)](#user-content-apply-plat-ue2-sandbox-foobar) + + +
Apply complete! Resources: 1 added, 0 changed, 1 destroyed. + +
+To reproduce this locally, run:

+ +```shell +atmos terraform apply foobar -s plat-ue2-sandbox +``` +
+ + +
Terraform Apply Summary + +```hcl +random_id.foo: Destroying... [id=oIE_s3bSF9A] +random_id.foo: Destruction complete after 0s +random_id.foo: Creating... +random_id.foo: Creation complete after 0s [id=WGAQulCR148] + +Apply complete! Resources: 1 added, 0 changed, 1 destroyed. + +Outputs: + +result = "WGAQulCR148" +sensitive_value = + +``` + +
+ +
Terraform Outputs + +| name | value | +|----|---------------| +| result | "WGAQulCR148" | +| sensitive_value | \ | + +
+ + ## Trademarks All other trademarks referenced herein are the property of their respective owners. diff --git a/action.yml b/action.yml index 4724125..65b95ef 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index b2c55ca..3474dad 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -71,7 +71,9 @@ terraform:
Terraform Outputs + %TERRAFORM_OUTPUTS% +
{{if ne .Vars.infracost_details_diff_breakdown ""}} From 548f507b7f9e4c3319d638127e6e6afcb82782fe Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:55:54 +0100 Subject: [PATCH 16/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 65b95ef..a50495f 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else "\`.value.value\`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 8b7c97090d988cff231439c5cd5cdbe6ffb43902 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 22:58:11 +0100 Subject: [PATCH 17/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a50495f..65b95ef 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else "\`.value.value\`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 0180c425ad4fca736e53085e502114657e52a8bd Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 23:00:32 +0100 Subject: [PATCH 18/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 65b95ef..a92c848 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From a4c532e0001f09757283b29520e5880d22fe6875 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 23:52:39 +0100 Subject: [PATCH 19/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a92c848..36f486d 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,7 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "\\" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 0bc61e87ad4a4529310e2f6e273f834972278019 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Wed, 24 Jan 2024 23:57:14 +0100 Subject: [PATCH 20/88] Added test-workflows --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 36f486d..bf66f6b 100644 --- a/action.yml +++ b/action.yml @@ -290,8 +290,8 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//$'\n'/
}/g" ${{ github.workspace }}/atmos-apply-summary.md + TERRAFORM_OUTPUTS=$(terraform output --json | jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 0f04b7f38e4530e29225a7896a876f9f3080ba34 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:05:31 +0100 Subject: [PATCH 21/88] Added test-workflows --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index bf66f6b..517fb78 100644 --- a/action.yml +++ b/action.yml @@ -290,7 +290,9 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")') + TERRAFORM_OUTPUTS=$(terraform output --json | \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + ) sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From a989ecd7f6d4d883999460a9b9880f04588e7838 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:05:57 +0100 Subject: [PATCH 22/88] Added test-workflows --- action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/action.yml b/action.yml index 517fb78..5422f49 100644 --- a/action.yml +++ b/action.yml @@ -293,6 +293,9 @@ runs: TERRAFORM_OUTPUTS=$(terraform output --json | \ jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) + + echo "${TERRAFORM_OUTPUTS}" + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 9cca985b915796443c87fdf5751f9141b82dcf67 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:08:08 +0100 Subject: [PATCH 23/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5422f49..a3400c5 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From bf25ac47012c65240320d6ed32f4b34faf4cac4f Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:14:54 +0100 Subject: [PATCH 24/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a3400c5..e07cb05 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @html' \ ) echo "${TERRAFORM_OUTPUTS}" From c1e534d7638815f35c5f5789ced5036135665881 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:15:44 +0100 Subject: [PATCH 25/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e07cb05..2ca4f43 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else .value.value end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @html' \ + jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ ) echo "${TERRAFORM_OUTPUTS}" From fdd069ef2bbdfff2c315fa26434d6e9fcaaca50f Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:22:36 +0100 Subject: [PATCH 26/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2ca4f43..d92c154 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ ) echo "${TERRAFORM_OUTPUTS}" From 5351dd7a42bb96d1f1beaae6796910095cd0f0e2 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:24:09 +0100 Subject: [PATCH 27/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d92c154..ff39a22 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From 2346dfa6129d453899e1626ddebaef5b744d548d Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:27:44 +0100 Subject: [PATCH 28/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ff39a22..d92c154 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ ) echo "${TERRAFORM_OUTPUTS}" From 363e07d077245a5074280640548d38427a8799fa Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:30:10 +0100 Subject: [PATCH 29/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d92c154..b2905fa 100644 --- a/action.yml +++ b/action.yml @@ -296,7 +296,7 @@ runs: echo "${TERRAFORM_OUTPUTS}" - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS}/g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//\//\\/}/g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 7a16dac7f42c06b9416ec59cb81564f6352aeba3 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:31:55 +0100 Subject: [PATCH 30/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b2905fa..5ef47dd 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n") | @sh' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From 99af067bde4ab6b1b58b31da72a3c8e7ae458ee5 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:32:22 +0100 Subject: [PATCH 31/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5ef47dd..e085388 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "```\n" + .value.value + "\n```" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From 768e46f2c84f88c35003073238a1196f9c1163a4 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:48:15 +0100 Subject: [PATCH 32/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e085388..5ef47dd 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "```\n" + .value.value + "\n```" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From 4906dbde647307ef00d3255102273a2d6ff7b439 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:52:47 +0100 Subject: [PATCH 33/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5ef47dd..296fd43 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -M 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From 1fd80f15ff1d6ee3929e066a3e2cb896a0e45836 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 00:56:48 +0100 Subject: [PATCH 34/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 296fd43..9240b15 100644 --- a/action.yml +++ b/action.yml @@ -291,7 +291,7 @@ runs: apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\n")' \ + jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\\n")' \ ) echo "${TERRAFORM_OUTPUTS}" From e2bf5f3a8e946907e65399d9a39cfe13d349735b Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 01:01:06 +0100 Subject: [PATCH 35/88] Added test-workflows --- config/atmos_github_summary.yaml | 1 + tests/components/terraform/foobar/outputs.tf | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 3474dad..021acc7 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -72,6 +72,7 @@ terraform:
Terraform Outputs + %TERRAFORM_OUTPUTS%
diff --git a/tests/components/terraform/foobar/outputs.tf b/tests/components/terraform/foobar/outputs.tf index 9f1b97e..055f02d 100644 --- a/tests/components/terraform/foobar/outputs.tf +++ b/tests/components/terraform/foobar/outputs.tf @@ -7,4 +7,15 @@ output "sensitive_value" { description = "Test sensitive description output" value = random_id.foo.id sensitive = true +} + + +output "structured_value" { + description = "Test structured output" + value = { + test = "test" + value = { + result = random_id.foo.id + } + } } \ No newline at end of file From d9c2fc3a2d1edf6dc5feb965d74c84ee68de437a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 01:12:05 +0100 Subject: [PATCH 36/88] Added test-workflows --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index 9240b15..240aaee 100644 --- a/action.yml +++ b/action.yml @@ -141,6 +141,13 @@ runs: repo: suzuki-shunsuke/tfcmt tag: v4.6.0 + - name: Install terraform-docs + if: env.ACTIONS_ENABLED == 'true' + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: terraform-docs/terraform-docs + tag: v0.17.0 + - name: Define Job Variables if: env.ACTIONS_ENABLED == 'true' id: vars From a98106a6a1c1c7e74211e39ae465ad8b80b40559 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 01:21:49 +0100 Subject: [PATCH 37/88] Added test-workflows --- action.yml | 8 +++----- config/tfdocs-config.yaml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 config/tfdocs-config.yaml diff --git a/action.yml b/action.yml index 240aaee..72d0c61 100644 --- a/action.yml +++ b/action.yml @@ -297,13 +297,11 @@ runs: --log-level $([[ "${{ inputs.debug }}" == "true" ]] && echo "DEBUG" || echo "INFO") \ apply -- terraform apply ${{ steps.vars.outputs.plan_file }} || EXIT_CODE=$? - TERRAFORM_OUTPUTS=$(terraform output --json | \ - jq -Mr 'to_entries | map(["|", .key, "|", if .value.sensitive then "![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)" else "`" + .value.value + "`" end, "|"] | join(" ")) | if length > 0 then ["| name | value |", "|----|----|"] + . else ["No outputs"] end | join("\\n")' \ - ) + terraform output --json > output_values.json - echo "${TERRAFORM_OUTPUTS}" + terraform-docs -c ${{ github.action_path }}/config/tfdocs-config.yaml . - sed -i "s/%TERRAFORM_OUTPUTS%/${TERRAFORM_OUTPUTS//\//\\/}/g" ${{ github.workspace }}/atmos-apply-summary.md + cat output.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml new file mode 100644 index 0000000..f4f2038 --- /dev/null +++ b/config/tfdocs-config.yaml @@ -0,0 +1,35 @@ +formatter: "markdown" + +content: |- + {{ .Outputs }} + +output: + file: "output.md" + mode: inject + template: |- + + {{ .Content }} + + +output-values: + enabled: false + from: "output_values.json" + +sort: + enabled: true + by: name + +settings: + anchor: true + color: true + default: true + description: false + escape: true + hide-empty: false + html: true + indent: 2 + lockfile: true + read-comments: true + required: true + sensitive: true + type: true \ No newline at end of file From f1c10fb37f481b4a40b301ac535ed71f652a7d43 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 01:26:20 +0100 Subject: [PATCH 38/88] Added test-workflows --- action.yml | 4 ++-- config/tfdocs-config.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 72d0c61..2eea6ec 100644 --- a/action.yml +++ b/action.yml @@ -299,9 +299,9 @@ runs: terraform output --json > output_values.json - terraform-docs -c ${{ github.action_path }}/config/tfdocs-config.yaml . + terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - cat output.md + cat ,/output.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index f4f2038..8b1ac74 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -1,5 +1,9 @@ formatter: "markdown" +sections: + show: + - outputs + content: |- {{ .Outputs }} From 180027b0d4c32195dce3390972025bd917571320 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:02:45 +0100 Subject: [PATCH 39/88] Added test-workflows --- action.yml | 2 ++ config/tfdocs-config.yaml | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 2eea6ec..1b03659 100644 --- a/action.yml +++ b/action.yml @@ -299,6 +299,8 @@ runs: terraform output --json > output_values.json + terraform-docs --help + terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ cat ,/output.md diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 8b1ac74..0ed1065 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,9 +11,7 @@ output: file: "output.md" mode: inject template: |- - {{ .Content }} - output-values: enabled: false From 5f417e9ec545e532bcfad08baab0762c307c201a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:05:25 +0100 Subject: [PATCH 40/88] Added test-workflows --- action.yml | 2 -- config/tfdocs-config.yaml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 1b03659..2eea6ec 100644 --- a/action.yml +++ b/action.yml @@ -299,8 +299,6 @@ runs: terraform output --json > output_values.json - terraform-docs --help - terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ cat ,/output.md diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 0ed1065..d0cdacc 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,7 +11,10 @@ output: file: "output.md" mode: inject template: |- + {{ .Content }} + + output-values: enabled: false From a384b9cd5f9f553961f1468ea9fc362a5881a4c9 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:10:30 +0100 Subject: [PATCH 41/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index d0cdacc..9ac4f14 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -9,7 +9,7 @@ content: |- output: file: "output.md" - mode: inject + mode: replace template: |- {{ .Content }} From f6752407323cf2ea38d97cffe284385e9d918639 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:13:41 +0100 Subject: [PATCH 42/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2eea6ec..a9b3127 100644 --- a/action.yml +++ b/action.yml @@ -301,7 +301,7 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - cat ,/output.md + cat ./output.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From f3776a9399149621625e2162f09b6d3a7f41fe83 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:18:02 +0100 Subject: [PATCH 43/88] Added test-workflows --- action.yml | 2 -- config/atmos_github_summary.yaml | 3 ++- config/tfdocs-config.yaml | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index a9b3127..58afe67 100644 --- a/action.yml +++ b/action.yml @@ -301,8 +301,6 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - cat ./output.md - cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY if [ $EXIT_CODE -eq 0 ]; then diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 021acc7..39aad05 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,7 +73,8 @@ terraform:
Terraform Outputs - %TERRAFORM_OUTPUTS% + +
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 9ac4f14..8a73a76 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -8,8 +8,8 @@ content: |- {{ .Outputs }} output: - file: "output.md" - mode: replace + file: "atmos-apply-summary.md" + mode: inject template: |- {{ .Content }} From f07c5c2f6063aea84051eefa4cad7515eb075cb1 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:22:43 +0100 Subject: [PATCH 44/88] Added test-workflows --- config/atmos_github_summary.yaml | 1 + config/tfdocs-config.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 39aad05..c4b641e 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -74,6 +74,7 @@ terraform: + TEST diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 8a73a76..5f34b98 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -9,7 +9,7 @@ content: |- output: file: "atmos-apply-summary.md" - mode: inject + mode: replace template: |- {{ .Content }} From 02cafa16e9e78b20523469387bec0f705d0f6419 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:48:13 +0100 Subject: [PATCH 45/88] Added test-workflows --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 58afe67..97d743b 100644 --- a/action.yml +++ b/action.yml @@ -301,6 +301,8 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ + cat "${{ github.workspace }}/atmos-apply-summary.md" + cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY if [ $EXIT_CODE -eq 0 ]; then From 7977ece74bacda666b6760c5ca96375eb37014ff Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:58:04 +0100 Subject: [PATCH 46/88] Added test-workflows --- config/atmos_github_summary.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index c4b641e..141b550 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -74,7 +74,7 @@ terraform: - TEST + {{ .Content }} From 45d8b47393926877b030d3a97bc29d1a5729c7fa Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 11:59:29 +0100 Subject: [PATCH 47/88] Added test-workflows --- config/atmos_github_summary.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 141b550..39aad05 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -74,7 +74,6 @@ terraform: - {{ .Content }} From a40bc8a9147b1cfaaf16c959b91a2a22e11fc770 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:04:30 +0100 Subject: [PATCH 48/88] Added test-workflows --- config/atmos_github_summary.yaml | 4 ++-- config/tfdocs-config.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 39aad05..8e8482a 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,8 +73,8 @@ terraform:
Terraform Outputs - - + [!-- BEGIN_TF_DOCS --] + [!-- END_TF_DOCS --]
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 5f34b98..21d8056 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,9 +11,9 @@ output: file: "atmos-apply-summary.md" mode: replace template: |- - + [!-- BEGIN_TF_DOCS --] {{ .Content }} - + [!-- END_TF_DOCS --] output-values: From f86e6d754f048fa5eb3a3af7f1ed636244deda18 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:06:40 +0100 Subject: [PATCH 49/88] Added test-workflows --- action.yml | 2 ++ config/atmos_github_summary.yaml | 4 ++-- config/tfdocs-config.yaml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 97d743b..7bb069f 100644 --- a/action.yml +++ b/action.yml @@ -299,6 +299,8 @@ runs: terraform output --json > output_values.json + cat "${{ github.workspace }}/atmos-apply-summary.md" + terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ cat "${{ github.workspace }}/atmos-apply-summary.md" diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 8e8482a..39aad05 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,8 +73,8 @@ terraform:
Terraform Outputs - [!-- BEGIN_TF_DOCS --] - [!-- END_TF_DOCS --] + +
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 21d8056..5f34b98 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,9 +11,9 @@ output: file: "atmos-apply-summary.md" mode: replace template: |- - [!-- BEGIN_TF_DOCS --] + {{ .Content }} - [!-- END_TF_DOCS --] + output-values: From 5936d4bd0bedb3fef1700ecb22e706bac0a16bcb Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:11:23 +0100 Subject: [PATCH 50/88] Added test-workflows --- config/atmos_github_summary.yaml | 4 ++-- config/tfdocs-config.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 39aad05..8e8482a 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,8 +73,8 @@ terraform:
Terraform Outputs - - + [!-- BEGIN_TF_DOCS --] + [!-- END_TF_DOCS --]
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 5f34b98..281f0d0 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -9,11 +9,11 @@ content: |- output: file: "atmos-apply-summary.md" - mode: replace + mode: inject template: |- - + [!-- BEGIN_TF_DOCS --] {{ .Content }} - + [!-- END_TF_DOCS --] output-values: From 3a9b49d063e36fa3a554d5cbe5d442c99c071691 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:13:29 +0100 Subject: [PATCH 51/88] Added test-workflows --- config/atmos_github_summary.yaml | 4 ++-- config/tfdocs-config.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 8e8482a..39aad05 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,8 +73,8 @@ terraform:
Terraform Outputs - [!-- BEGIN_TF_DOCS --] - [!-- END_TF_DOCS --] + +
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 281f0d0..8a73a76 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,9 +11,9 @@ output: file: "atmos-apply-summary.md" mode: inject template: |- - [!-- BEGIN_TF_DOCS --] + {{ .Content }} - [!-- END_TF_DOCS --] + output-values: From cab7b1d78028abc680cbcc3545d21beb1651f70a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:15:55 +0100 Subject: [PATCH 52/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 8a73a76..4bbe7c9 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -17,7 +17,7 @@ output: output-values: - enabled: false + enabled: true from: "output_values.json" sort: From ae0aa0da8cf4236befbe58adda3da884a43ea9ed Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:27:07 +0100 Subject: [PATCH 53/88] Added test-workflows --- action.yml | 6 +++--- config/atmos_github_summary.yaml | 1 + config/tfdocs-config.yaml | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 7bb069f..173c650 100644 --- a/action.yml +++ b/action.yml @@ -301,9 +301,9 @@ runs: cat "${{ github.workspace }}/atmos-apply-summary.md" - terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - - cat "${{ github.workspace }}/atmos-apply-summary.md" + # terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ + # + # cat "${{ github.workspace }}/atmos-apply-summary.md" cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 39aad05..c4b641e 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -74,6 +74,7 @@ terraform: + TEST diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 4bbe7c9..a77e13d 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -15,7 +15,6 @@ output: {{ .Content }} - output-values: enabled: true from: "output_values.json" From c473941219cd32b7644e0aaf18e956079415668c Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:32:13 +0100 Subject: [PATCH 54/88] Added test-workflows --- config/atmos_github_summary.yaml | 5 +++-- config/tfdocs-config.yaml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index c4b641e..48a7d44 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,9 +73,10 @@ terraform:
Terraform Outputs - + [//]: # (BEGIN_TF_DOCS) TEST - + + [//]: # (END_TF_DOCS)
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index a77e13d..bedc149 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -11,9 +11,10 @@ output: file: "atmos-apply-summary.md" mode: inject template: |- - + [//]: # (BEGIN_TF_DOCS) {{ .Content }} - + + [//]: # (END_TF_DOCS) output-values: enabled: true From 48e59d4d467c546b1ceb02995b1d58b46cf27d5a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 12:34:24 +0100 Subject: [PATCH 55/88] Added test-workflows --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 173c650..0789df1 100644 --- a/action.yml +++ b/action.yml @@ -299,11 +299,11 @@ runs: terraform output --json > output_values.json - cat "${{ github.workspace }}/atmos-apply-summary.md" + # cat "${{ github.workspace }}/atmos-apply-summary.md" - # terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - # - # cat "${{ github.workspace }}/atmos-apply-summary.md" + terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ + + cat "${{ github.workspace }}/atmos-apply-summary.md" cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From fdabcad5b1c7f5c628dd739e11464f8a02b43828 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:18:49 +0100 Subject: [PATCH 56/88] Added test-workflows --- action.yml | 2 -- config/atmos_github_summary.yaml | 2 -- config/tfdocs-config.yaml | 3 +-- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 0789df1..627f8be 100644 --- a/action.yml +++ b/action.yml @@ -303,8 +303,6 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ - cat "${{ github.workspace }}/atmos-apply-summary.md" - cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY if [ $EXIT_CODE -eq 0 ]; then diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index 48a7d44..ebf513d 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -74,8 +74,6 @@ terraform: [//]: # (BEGIN_TF_DOCS) - TEST - [//]: # (END_TF_DOCS) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index bedc149..dfe08c0 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -13,11 +13,10 @@ output: template: |- [//]: # (BEGIN_TF_DOCS) {{ .Content }} - [//]: # (END_TF_DOCS) output-values: - enabled: true + enabled: false from: "output_values.json" sort: From f0b2c4a0b352dd6aad0d1a7092fca3bc8d5d0608 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:22:44 +0100 Subject: [PATCH 57/88] Added test-workflows --- config/atmos_github_summary.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index ebf513d..fd11609 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -72,7 +72,6 @@ terraform:
Terraform Outputs - [//]: # (BEGIN_TF_DOCS) [//]: # (END_TF_DOCS) From c5ed816ee90fc3c725eb5dca5a70f3076eea4ac9 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:26:22 +0100 Subject: [PATCH 58/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 627f8be..89de3eb 100644 --- a/action.yml +++ b/action.yml @@ -299,7 +299,7 @@ runs: terraform output --json > output_values.json - # cat "${{ github.workspace }}/atmos-apply-summary.md" + cat output_values.json terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ From 3ff9cec5aa161a323140255d288827bd5b8bdd7a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:33:22 +0100 Subject: [PATCH 59/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 89de3eb..464689b 100644 --- a/action.yml +++ b/action.yml @@ -299,7 +299,7 @@ runs: terraform output --json > output_values.json - cat output_values.json + echo "terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./" terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ From 8b9e8d71b94ad0cb3eb044002a1544787a7c8649 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:39:36 +0100 Subject: [PATCH 60/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 464689b..64c290d 100644 --- a/action.yml +++ b/action.yml @@ -301,7 +301,7 @@ runs: echo "terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./" - terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./ + terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 3d0267dfbf84069d5b1c8c6e69a7aa919b8d69b0 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 13:41:46 +0100 Subject: [PATCH 61/88] Added test-workflows --- config/atmos_github_summary.yaml | 1 + config/tfdocs-config.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/config/atmos_github_summary.yaml b/config/atmos_github_summary.yaml index fd11609..368746e 100644 --- a/config/atmos_github_summary.yaml +++ b/config/atmos_github_summary.yaml @@ -73,6 +73,7 @@ terraform:
Terraform Outputs [//]: # (BEGIN_TF_DOCS) + [//]: # (END_TF_DOCS)
diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index dfe08c0..84a4936 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -13,6 +13,7 @@ output: template: |- [//]: # (BEGIN_TF_DOCS) {{ .Content }} + [//]: # (END_TF_DOCS) output-values: From c3eb6cda6605928100129b46d95b7761de34036c Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 14:19:47 +0100 Subject: [PATCH 62/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 84a4936..bedc149 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -17,7 +17,7 @@ output: [//]: # (END_TF_DOCS) output-values: - enabled: false + enabled: true from: "output_values.json" sort: From 38ff25d40ef8b6200fe9f4c69f053cd96b351105 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 14:33:38 +0100 Subject: [PATCH 63/88] Added test-workflows --- config/tfdocs-config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index bedc149..6e0ab72 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -5,7 +5,9 @@ sections: - outputs content: |- - {{ .Outputs }} + {{ range .Module.Outputs }} + - {{ .Name }} + {{- end }} output: file: "atmos-apply-summary.md" From 8ae7535fd184d201b28cfda30dec5dd165b39c9e Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 14:38:42 +0100 Subject: [PATCH 64/88] Added test-workflows --- config/tfdocs-config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 6e0ab72..32fd8b0 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -5,8 +5,10 @@ sections: - outputs content: |- + | Name | Description | Value | + |------|-------------|-------| {{ range .Module.Outputs }} - - {{ .Name }} + | {{ .Name }} | {{ .Description }} | {{ .Value }} | {{- end }} output: From f291d81378ed5526fa909acd1a4d887c7c156e4a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 14:46:18 +0100 Subject: [PATCH 65/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 32fd8b0..29e3750 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -8,7 +8,7 @@ content: |- | Name | Description | Value | |------|-------------|-------| {{ range .Module.Outputs }} - | {{ .Name }} | {{ .Description }} | {{ .Value }} | + | {{ .Name }} | {{ .Description }} | {{ .GetValue() }} | {{- end }} output: From 20cddf4af7f761e6c5dde9a36a47ad28e3c7a18a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 14:49:02 +0100 Subject: [PATCH 66/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 29e3750..f6c5749 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -8,7 +8,7 @@ content: |- | Name | Description | Value | |------|-------------|-------| {{ range .Module.Outputs }} - | {{ .Name }} | {{ .Description }} | {{ .GetValue() }} | + | {{ .Name }} | {{ .Description }} | {{ .GetValue }} | {{- end }} output: From 6857d3bbcbf20adff1ed0df2cde1a07fb32b1b3b Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:00:19 +0100 Subject: [PATCH 67/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index f6c5749..73ff314 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -7,7 +7,7 @@ sections: content: |- | Name | Description | Value | |------|-------------|-------| - {{ range .Module.Outputs }} + {{- range .Module.Outputs }} | {{ .Name }} | {{ .Description }} | {{ .GetValue }} | {{- end }} From 7a05639d4fed49a059c4624c3dae77fb2aab3543 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:03:40 +0100 Subject: [PATCH 68/88] Added test-workflows --- config/tfdocs-config.yaml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 73ff314..515d236 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -5,11 +5,27 @@ sections: - outputs content: |- - | Name | Description | Value | - |------|-------------|-------| - {{- range .Module.Outputs }} - | {{ .Name }} | {{ .Description }} | {{ .GetValue }} | - {{- end }} + {{- if .Config.Sections.Outputs -}} + {{- if not .Module.Outputs -}} + {{- if not .Config.Settings.HideEmpty -}} + {{- indent 0 "#" }} Outputs + + No outputs. + {{ end }} + {{ else }} + {{- indent 0 "#" }} Outputs + + | Name | Description |{{ if .Config.OutputValues.Enabled }} Value |{{ end }} + |------|-------------|{{ if .Config.OutputValues.Enabled }}-------|{{ end }} + {{- range .Module.Outputs }} + | {{ anchorNameMarkdown "output" .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | + {{- if $.Config.OutputValues.Enabled -}} + {{- $sensitive := ternary .Sensitive "" .GetValue -}} + {{ printf " " }}{{ value $sensitive | sanitizeMarkdownTbl }} | + {{- end -}} + {{- end }} + {{ end }} + {{ end -}} output: file: "atmos-apply-summary.md" From 0cffb14ff5a6c4f70b607aaba60ea84947fb8672 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:09:34 +0100 Subject: [PATCH 69/88] Added test-workflows --- config/tfdocs-config.yaml | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 515d236..86f0c8e 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -5,27 +5,18 @@ sections: - outputs content: |- - {{- if .Config.Sections.Outputs -}} - {{- if not .Module.Outputs -}} - {{- if not .Config.Settings.HideEmpty -}} - {{- indent 0 "#" }} Outputs - - No outputs. - {{ end }} - {{ else }} - {{- indent 0 "#" }} Outputs - - | Name | Description |{{ if .Config.OutputValues.Enabled }} Value |{{ end }} - |------|-------------|{{ if .Config.OutputValues.Enabled }}-------|{{ end }} - {{- range .Module.Outputs }} - | {{ anchorNameMarkdown "output" .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | - {{- if $.Config.OutputValues.Enabled -}} - {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ value $sensitive | sanitizeMarkdownTbl }} | - {{- end -}} - {{- end }} - {{ end }} - {{ end -}} + {{- if not .Module.Outputs -}} + No outputs. + {{ else }} + + | Name | Description | Value | + |------|-------------|-------| + {{- range .Module.Outputs }} + | {{ tostring .Name | sanitizeMarkdownTbl }} | {{ tostring .Description | sanitizeMarkdownTbl }} | + {{- $sensitive := ternary .Sensitive "" .GetValue -}} + {{ printf " " }}{{ tostring $sensitive | sanitizeMarkdownTbl }} | + {{- end }} + {{ end }} output: file: "atmos-apply-summary.md" From c486549423fbb9cabd3181ecf5a4639a12f617d0 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:16:18 +0100 Subject: [PATCH 70/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 86f0c8e..79143c5 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -12,7 +12,7 @@ content: |- | Name | Description | Value | |------|-------------|-------| {{- range .Module.Outputs }} - | {{ tostring .Name | sanitizeMarkdownTbl }} | {{ tostring .Description | sanitizeMarkdownTbl }} | + | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} {{ printf " " }}{{ tostring $sensitive | sanitizeMarkdownTbl }} | {{- end }} From 5f68b7a6758d23be84d393a451040d18198a9bbd Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:20:43 +0100 Subject: [PATCH 71/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 79143c5..d02a132 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ tostring $sensitive | sanitizeMarkdownTbl }} | + {{ printf " " }}{{ .GetValue | sanitizeMarkdownTbl }} | {{- end }} {{ end }} From 026ba415244b6c6ac0a5878110edff8fef1ecfc4 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 15:23:14 +0100 Subject: [PATCH 72/88] Added test-workflows --- config/tfdocs-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index d02a132..f0ee3c7 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -6,16 +6,16 @@ sections: content: |- {{- if not .Module.Outputs -}} - No outputs. + No outputs. {{ else }} - | Name | Description | Value | - |------|-------------|-------| - {{- range .Module.Outputs }} - | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | - {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ .GetValue | sanitizeMarkdownTbl }} | - {{- end }} + | Name | Description | Value | + |------|-------------|-------| + {{- range .Module.Outputs }} + | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | + {{- $sensitive := ternary .Sensitive "" .GetValue -}} + {{ printf " " }}{{ .GetValue | sanitizeMarkdownTbl }} | + {{- end }} {{ end }} output: From 64ad08e37b5571dce1c9c3927064f66c6a9958a0 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 17:40:08 +0100 Subject: [PATCH 73/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index f0ee3c7..68dda1b 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ .GetValue | sanitizeMarkdownTbl }} | + {{ printf " " }}{{ value .GetValue | sanitizeMarkdownTbl }} | {{- end }} {{ end }} From cc29a39fd53c765a53f160960eace665e8f09104 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 17:46:06 +0100 Subject: [PATCH 74/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 68dda1b..5e56b37 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ value .GetValue | sanitizeMarkdownTbl }} | + {{ printf " " }}`{{ .GetValue | `sanitizeMarkdownTbl }}` | {{- end }} {{ end }} From dce4c2a54e94fc1831602739badfae8ea8a17188 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 17:46:38 +0100 Subject: [PATCH 75/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 5e56b37..6f5f891 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}`{{ .GetValue | `sanitizeMarkdownTbl }}` | + {{ printf " " }}`{{ .GetValue | sanitizeMarkdownTbl }}` | {{- end }} {{ end }} From 2a837f10ee952de3e4553c166c780a05502a1416 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 17:55:27 +0100 Subject: [PATCH 76/88] Added test-workflows --- config/tfdocs-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 6f5f891..f7e7d81 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -1,4 +1,4 @@ -formatter: "markdown" +formatter: "markdown table" sections: show: @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}`{{ .GetValue | sanitizeMarkdownTbl }}` | + {{ printf " " }}`{{ value .GetValue | sanitizeMarkdownTbl }}` | {{- end }} {{ end }} From f134169638fc5634643cbc602e3e907c10e5514d Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 17:58:58 +0100 Subject: [PATCH 77/88] Added test-workflows --- config/tfdocs-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index f7e7d81..f8f9554 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -1,4 +1,4 @@ -formatter: "markdown table" +formatter: "markdown" sections: show: @@ -14,7 +14,7 @@ content: |- {{- range .Module.Outputs }} | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}`{{ value .GetValue | sanitizeMarkdownTbl }}` | + {{ printf " " }}{{ $sensitive | sanitizeMarkdownTbl }} | {{- end }} {{ end }} From a3e1c1a027ae369cc3f71e58a99226b11d935b07 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:03:12 +0100 Subject: [PATCH 78/88] Added test-workflows --- config/tfdocs-config.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index f8f9554..bedc149 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -5,18 +5,7 @@ sections: - outputs content: |- - {{- if not .Module.Outputs -}} - No outputs. - {{ else }} - - | Name | Description | Value | - |------|-------------|-------| - {{- range .Module.Outputs }} - | {{ .Name }} | {{ tostring .Description | sanitizeMarkdownTbl }} | - {{- $sensitive := ternary .Sensitive "" .GetValue -}} - {{ printf " " }}{{ $sensitive | sanitizeMarkdownTbl }} | - {{- end }} - {{ end }} + {{ .Outputs }} output: file: "atmos-apply-summary.md" From 51faf9136229b61b3fa4da9302f9df5f8c06ac65 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:06:04 +0100 Subject: [PATCH 79/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index bedc149..44b3121 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -36,5 +36,5 @@ settings: lockfile: true read-comments: true required: true - sensitive: true + sensitive: false type: true \ No newline at end of file From d41bbe117ff9140b51b8e1eacc293b7437ad2152 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:17:44 +0100 Subject: [PATCH 80/88] Added test-workflows --- config/tfdocs-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/tfdocs-config.yaml b/config/tfdocs-config.yaml index 44b3121..efc3460 100644 --- a/config/tfdocs-config.yaml +++ b/config/tfdocs-config.yaml @@ -25,7 +25,7 @@ sort: by: name settings: - anchor: true + anchor: false color: true default: true description: false From e9ca2ab25fd2e671626b342906c234629c45cac9 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:24:42 +0100 Subject: [PATCH 81/88] Added test-workflows --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 64c290d..31c16e8 100644 --- a/action.yml +++ b/action.yml @@ -302,6 +302,8 @@ runs: echo "terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml ./" terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ + + sed -i "s//TEST/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From e832035cc38e3fb3b936a9b551409297c4c8bfe6 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:26:36 +0100 Subject: [PATCH 82/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 31c16e8..a8fbf8b 100644 --- a/action.yml +++ b/action.yml @@ -303,7 +303,7 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ - sed -i "s//TEST/" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/``/TEST/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 3dfcacd9b1b7c7a257a7e554b23a9692f1f9cd60 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:29:19 +0100 Subject: [PATCH 83/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a8fbf8b..9374a84 100644 --- a/action.yml +++ b/action.yml @@ -303,7 +303,7 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ - sed -i "s/``/TEST/" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s/\`\`/TEST/" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 7d7d7ccdc89352b57c016ae973d93b2faac3a98e Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:32:09 +0100 Subject: [PATCH 84/88] Added test-workflows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9374a84..3d8115d 100644 --- a/action.yml +++ b/action.yml @@ -303,7 +303,7 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ - sed -i "s/\`\`/TEST/" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 6b2fe77f6497e300cdf982d381b0677070f36939 Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:36:21 +0100 Subject: [PATCH 85/88] Added test-workflows --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 3d8115d..db4c3bc 100644 --- a/action.yml +++ b/action.yml @@ -304,6 +304,7 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\`\"#\`#" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 19ac9fd13ebdf62fd0f9e6f6de5c89380898fd2a Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 18:37:04 +0100 Subject: [PATCH 86/88] Added test-workflows --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index db4c3bc..e86a729 100644 --- a/action.yml +++ b/action.yml @@ -305,6 +305,7 @@ runs: sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#" ${{ github.workspace }}/atmos-apply-summary.md sed -i "s#\`\"#\`#" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\"\`#\`#" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 87cb853b02655b066631e1e7d8fdb303911794cd Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 19:40:51 +0100 Subject: [PATCH 87/88] Added test-workflows --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index e86a729..abd340a 100644 --- a/action.yml +++ b/action.yml @@ -306,6 +306,7 @@ runs: sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#" ${{ github.workspace }}/atmos-apply-summary.md sed -i "s#\`\"#\`#" ${{ github.workspace }}/atmos-apply-summary.md sed -i "s#\"\`#\`#" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#|--#|:-#" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY From 3095d63856bb96f9a185141940dc4f150fb37ded Mon Sep 17 00:00:00 2001 From: Igor Rodionov Date: Thu, 25 Jan 2024 19:43:18 +0100 Subject: [PATCH 88/88] Added test-workflows --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index abd340a..24cb501 100644 --- a/action.yml +++ b/action.yml @@ -303,10 +303,10 @@ runs: terraform-docs -c ${{ github.action_path }}config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./ - sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#" ${{ github.workspace }}/atmos-apply-summary.md - sed -i "s#\`\"#\`#" ${{ github.workspace }}/atmos-apply-summary.md - sed -i "s#\"\`#\`#" ${{ github.workspace }}/atmos-apply-summary.md - sed -i "s#|--#|:-#" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\`\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\`\"#\`#g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#\"\`#\`#g" ${{ github.workspace }}/atmos-apply-summary.md + sed -i "s#|--#|:-#g" ${{ github.workspace }}/atmos-apply-summary.md cat "${{ github.workspace }}/atmos-apply-summary.md" >> $GITHUB_STEP_SUMMARY