generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
108 changed files
with
4,529 additions
and
1,015 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
onboarding: | ||
- "environments/**" | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- "environments/**" | ||
|
||
dependencies: | ||
- "terraform/**/*.lock.hcl" | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- "terraform/**/*.lock.hcl" | ||
|
||
github-workflow: | ||
- "github/workflows/**" | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- ".github/workflows/**" | ||
|
||
environments-repository: | ||
- "**/*.*" | ||
- "**/*" | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- "**/*.*" | ||
- "**/*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
name: cdpt-ifs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'terraform/environments/cdpt-ifs/**' | ||
- '.github/workflows/cdpt-ifs.yml' | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
types: [opened, edited, reopened, synchronize] | ||
paths: | ||
- 'terraform/environments/cdpt-ifs/**' | ||
- '.github/workflows/cdpt-ifs.yml' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
action: | ||
description: 'Set either [deploy|destroy].' | ||
default: 'deploy' | ||
required: true | ||
type: string | ||
options: | ||
- deploy | ||
- destroy | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
strategy: | ||
uses: ./.github/workflows/reusable_terraform_strategy.yml | ||
if: inputs.action != 'destroy' | ||
with: | ||
application: "${{ github.workflow }}" | ||
|
||
terraform: | ||
needs: strategy | ||
if: inputs.action != 'destroy' | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.strategy.outputs.matrix) }} | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "${{ matrix.target }}" | ||
action: "${{ matrix.action }}" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" | ||
|
||
destroy-development: | ||
if: inputs.action == 'destroy' | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "development" | ||
action: "plan_apply" | ||
plan_apply_tfargs: "-destroy" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
terraform/environments/ccms-ebs-upgrade/ec2-oracle_webgate-alb-sg.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Security Group for WEBGATE LB | ||
resource "aws_security_group" "sg_webgate_lb" { | ||
name = "sg_webgate_lb" | ||
description = "Inbound traffic control for WebGate loadbalancer" | ||
vpc_id = data.aws_vpc.shared.id | ||
|
||
tags = merge(local.tags, | ||
{ Name = lower(format("sg-%s-%s-webgate-loadbalancer", local.application_name, local.environment)) } | ||
) | ||
} | ||
|
||
|
||
# INGRESS Rules | ||
|
||
### HTTPS | ||
|
||
resource "aws_security_group_rule" "ingress_traffic_webgatelb_443" { | ||
security_group_id = aws_security_group.sg_webgate_lb.id | ||
type = "ingress" | ||
description = "HTTPS" | ||
protocol = "TCP" | ||
from_port = 443 | ||
to_port = 443 | ||
cidr_blocks = [data.aws_vpc.shared.cidr_block, | ||
local.application_data.accounts[local.environment].lz_aws_subnet_env, | ||
local.application_data.accounts[local.environment].lz_aws_workspace_nonprod_subnet_env, | ||
local.application_data.accounts[local.environment].lz_aws_workspace_prod_subnet_env] | ||
} | ||
|
||
|
||
# EGRESS Rules | ||
|
||
### All | ||
|
||
resource "aws_security_group_rule" "egress_traffic_webgatelb_80" { | ||
security_group_id = aws_security_group.sg_webgate_lb.id | ||
type = "egress" | ||
description = "All" | ||
protocol = "TCP" | ||
from_port = 0 | ||
to_port = 0 | ||
cidr_blocks = ["0.0.0.0/0"] | ||
} | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.