From c06cac61dc1d9eaf07a3a4e98c810b318ba914af Mon Sep 17 00:00:00 2001 From: tylerthome Date: Wed, 9 Oct 2024 23:49:48 -0700 Subject: [PATCH] store before/after state, apply domain --- .github/workflows/terraform-plan-with-oidc.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/terraform-plan-with-oidc.yaml b/.github/workflows/terraform-plan-with-oidc.yaml index 1f2cad0..1400665 100644 --- a/.github/workflows/terraform-plan-with-oidc.yaml +++ b/.github/workflows/terraform-plan-with-oidc.yaml @@ -30,21 +30,25 @@ jobs: run: | pushd ./terraform-incubator/home-unite-us/dev terraform init - terraform show + + mkdir -p ./tfshow + + terraform show -no-color 1> ./tfshow/before.tf 2>&1 # sudo apt-get -y update - # sudo apt-get install graphviz - + # sudo apt-get install graphviz # terraform graph -type=plan | dot -Tpng -o graph.png terraform plan -out tf.plan - # terraform apply tf.plan + terraform apply tf.plan + terraform show -no-color 1> ./tfshow/after.tf 2>&1 + tar czf ./homeuniteus.tfshow.tgz ./tfshow/* - name: Store plan uses: actions/upload-artifact@v4 with: - name: homeuniteus-graph - path: ./terraform-incubator/home-unite-us/dev/graph.png + name: homeuniteus-tf-show + path: ./terraform-incubator/home-unite-us/dev/homeuniteus.tfshow.tgz