diff --git a/.github/workflows/continuous-integration-terraform.yml b/.github/workflows/continuous-integration-terraform.yml index fcd6c80b6..2b7e31296 100644 --- a/.github/workflows/continuous-integration-terraform.yml +++ b/.github/workflows/continuous-integration-terraform.yml @@ -1,13 +1,17 @@ -name: Validate terraform +name: Continuous Integration / Terraform on: push: branches: main + paths: + - 'terraform/**.tf' pull_request: + paths: + - 'terraform/**.tf' jobs: terraform-validate: - name: Terraform Validate + name: Validate runs-on: ubuntu-latest steps: - name: Check out code @@ -23,41 +27,46 @@ jobs: exit 1 fi + - name: Validate Terraform docs + uses: terraform-docs/gh-actions@v1.0.0 + with: + working-dir: terraform + config-file: .terraform-docs.yml + output-file: README.md + output-method: inject + fail-on-diff: true + - name: Remove azure backend run: rm ./terraform/backend.tf - name: Run a Terraform init - uses: docker://hashicorp/terraform:1.5.5 + uses: docker://hashicorp/terraform:1.5.6 with: entrypoint: terraform args: -chdir=terraform init - name: Run a Terraform validate - uses: docker://hashicorp/terraform:1.5.5 + uses: docker://hashicorp/terraform:1.5.6 with: entrypoint: terraform args: -chdir=terraform validate - name: Run a Terraform format check - uses: docker://hashicorp/terraform:1.5.5 + uses: docker://hashicorp/terraform:1.5.6 with: entrypoint: terraform args: -chdir=terraform fmt -check=true -diff=true - terraform-docs-validation: - name: Terraform Docs validation - needs: terraform-validate - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 + + - name: Setup TFLint + uses: terraform-linters/setup-tflint@v3 with: - ref: ${{ github.event.pull_request.head.ref }} + tflint_version: v0.44.1 - - name: Generate Terraform docs - uses: terraform-docs/gh-actions@v1.0.0 + - name: Run TFLint + working-directory: terraform + run: tflint -f compact + + - name: Run TFSec + uses: aquasecurity/tfsec-pr-commenter-action@v1.3.1 with: - working-dir: terraform - config-file: .terraform-docs.yml - output-file: README.md - output-method: inject - fail-on-diff: true + github_token: ${{ github.token }} diff --git a/.github/workflows/continuous-integration-tflint.yml b/.github/workflows/continuous-integration-tflint.yml deleted file mode 100644 index 69b2cf8a8..000000000 --- a/.github/workflows/continuous-integration-tflint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Terraform Lint - -on: - pull_request: - -jobs: - tflint: - name: tflint - runs-on: ubuntu-latest - defaults: - run: - working-directory: terraform - steps: - - name: Clone repo - uses: actions/checkout@v3 - - - name: Setup TFLint - uses: terraform-linters/setup-tflint@v3 - with: - tflint_version: v0.44.1 - - - name: Run TFLint - run: tflint -f compact diff --git a/.github/workflows/continuous-integration-tfsec.yml b/.github/workflows/continuous-integration-tfsec.yml deleted file mode 100644 index 8bee0ac7a..000000000 --- a/.github/workflows/continuous-integration-tfsec.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Terraform security scan -on: - pull_request: -jobs: - tfsec-pr-commenter: - name: tfsec PR commenter - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v3 - - name: tfsec - uses: aquasecurity/tfsec-pr-commenter-action@v1.2.0 - with: - github_token: ${{ github.token }} diff --git a/Dfe.Academies.Academisation.Service/Commands/CypressData/CyAddSponsoredProjectCommandHandler.cs b/Dfe.Academies.Academisation.Service/Commands/CypressData/CyAddSponsoredProjectCommandHandler.cs index 2c0c8d857..3ece98fa3 100644 --- a/Dfe.Academies.Academisation.Service/Commands/CypressData/CyAddSponsoredProjectCommandHandler.cs +++ b/Dfe.Academies.Academisation.Service/Commands/CypressData/CyAddSponsoredProjectCommandHandler.cs @@ -57,6 +57,7 @@ public async Task Handle(CyAddSponsoredProjectCommand request, Ca ProposedAcademyOpeningDate = new DateTime(2025, 2, 20), ConversionSupportGrantAmount = 25000, PublishedAdmissionNumber = "60673", + PartOfPfiScheme = "No", ViabilityIssues = "No", FinancialDeficit = "No", DistanceFromSchoolToTrustHeadquarters = 10,