diff --git a/.github/workflows/presubmit-build.yaml b/.github/workflows/presubmit-build.yaml index 5dc542f407..8566ef1d07 100644 --- a/.github/workflows/presubmit-build.yaml +++ b/.github/workflows/presubmit-build.yaml @@ -181,13 +181,10 @@ jobs: targets="" for image in ${{ matrix.shard.images }}; do targets+=' -target='module."${image}"'' - - echo "::group::Plan for ${image}" - terraform plan -target=module."${image}" - echo "::endgroup::" done - terraform apply ${targets} -auto-approve --parallelism=$(nproc) -json | tee /tmp/mega-module.tf.json | jq -r '.["@message"]' + terraform plan ${targets} -out=plan.tfplan + terraform apply ${targets} -auto-approve --parallelism=$(nproc) -json plan.tfplan | tee /tmp/mega-module.tf.json | jq -r '.["@message"]' - name: Collect TF diagnostics if: ${{ always() }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a0de9b7c01..4c573e2336 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -119,13 +119,10 @@ jobs: targets="" for image in ${{ matrix.shard.images }}; do targets+=' -target='module."${image}"'' - - echo "::group::Plan for ${image}" - terraform plan -target=module."${image}" - echo "::endgroup::" done - terraform apply ${targets} -auto-approve --parallelism=$(nproc) -json | tee /tmp/mega-module.tf.json | jq -r '.["@message"]' + terraform plan ${targets} -out mega-module.tfplan + terraform apply ${targets} -auto-approve --parallelism=$(nproc) -json mega-module.tfplan | tee /tmp/mega-module.tf.json | jq -r '.["@message"]' - name: Collect TF diagnostics if: ${{ always() }}