Add terraform plan
@@ -17,3 +17,37 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TF_ACTION_WORKING_DIR: ./infrastructure
+
+ plan:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@master
+
+ - name: terraform-init
+ uses: hashicorp/terraform-github-actions/init@v0.3.5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ TF_ACTION_WORKING_DIR: ./infrastructure
+
+ - name: terraform-validate
+ uses: hashicorp/terraform-github-actions/validate@v0.3.5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ TF_ACTION_WORKING_DIR: ./infrastructure
+
+ - name: terraform-plan
+ uses: hashicorp/terraform-github-actions/plan@v0.3.5
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ TF_VAR_database_password: ${{ secrets.TF_VAR_database_password }}
+ TF_VAR_secret_key: ${{ secrets.TF_VAR_secret_key }}
+ TF_VAR_ssl_certificate: ${{ secrets.TF_VAR_ssl_certificate }}
+ TF_ACTION_WORKING_DIR: ./infrastructure
+ TF_ACTION_WORKSPACE: production
\ No newline at end of file
