diff --git a/.github/workflows/check-and-plan.yml b/.github/workflows/check-and-plan.yml index 3a1ea1f..34fc591 100644 --- a/.github/workflows/check-and-plan.yml +++ b/.github/workflows/check-and-plan.yml @@ -1,6 +1,6 @@ name: Check and Plan on: - pull_request: + push: jobs: format: @@ -86,4 +86,34 @@ jobs: uses: aquasecurity/tfsec-action@v1.0.3 with: working_directory: terraform/ - version: v1.28.11 \ No newline at end of file + version: v1.28.11 + + plan_integration: + name: Integration Terraform plan + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + env: + AWS_REGION: "eu-west-2" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v3 + with: + role-to-assume: arn:aws:iam::486283582667:role/github-actions-terraform-ci-plan-read-only + aws-region: ${{ env.AWS_REGION }} + - name: Set up Terraform + uses: hashicorp/setup-terraform@v3 + with: + terraform_version: 1.9.1 + - name: Terraform init + run: terraform init -input=false + working-directory: terraform/integration + - name: Terraform validate + run: terraform validate + working-directory: terraform/integration + - name: Terraform plan + run: terraform plan -input=false -refresh=false -lock=false + working-directory: terraform/integration \ No newline at end of file diff --git a/terraform/integration/variables.tf b/terraform/integration/variables.tf index 1a2d810..2576af2 100644 --- a/terraform/integration/variables.tf +++ b/terraform/integration/variables.tf @@ -1,4 +1,5 @@ variable "ssl_certs_created" { description = "Indicates whether ssl certificates have already been manually created" type = bool + default = true } \ No newline at end of file