Skip to content

Commit

Permalink
Merge pull request #9055 from ministryofjustice/feature/8345-add-extr…
Browse files Browse the repository at this point in the history
…a-environments-to-use-native-locking

Set `github` and `pagerduty` to use native state locking
  • Loading branch information
dms1981 authored Jan 23, 2025
2 parents 4281cc9 + c46cff1 commit 19a95a2
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in terraform/modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in terraform/modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in terraform/modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
1 change: 0 additions & 1 deletion terraform/environments/bootstrap/single-sign-on/backend.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in terraform/modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
1 change: 0 additions & 1 deletion terraform/environments/core-sandbox/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
1 change: 0 additions & 1 deletion terraform/environments/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
10 changes: 5 additions & 5 deletions terraform/github/backend.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
bucket = "modernisation-platform-terraform-state"
encrypt = true
key = "github/terraform.tfstate"
region = "eu-west-2"
bucket = "modernisation-platform-terraform-state"
encrypt = true
key = "github/terraform.tfstate"
region = "eu-west-2"
use_lockfile = true
}
}
10 changes: 5 additions & 5 deletions terraform/pagerduty/backend.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in modernisation-platform-account/s3.tf
#checkov:skip=CKV_TF_3:Ensure state files are locked - temporarily suppressed pending issue #8789
backend "s3" {
bucket = "modernisation-platform-terraform-state"
encrypt = true
key = "pagerduty/terraform.tfstate"
region = "eu-west-2"
bucket = "modernisation-platform-terraform-state"
encrypt = true
key = "pagerduty/terraform.tfstate"
region = "eu-west-2"
use_lockfile = true
}
}
1 change: 0 additions & 1 deletion terraform/single-sign-on/backend.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
terraform {
# `backend` blocks do not support variables, so the following are hard-coded here:
# - S3 bucket name, which is created in terraform/modernisation-platform-account/s3.tf

backend "s3" {
acl = "bucket-owner-full-control"
bucket = "modernisation-platform-terraform-state"
Expand Down
2 changes: 1 addition & 1 deletion terraform/templates/modernisation-platform/backend.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ terraform {
region = "eu-west-2"
use_lockfile = true
workspace_key_prefix = "environments/accounts/$application_name" # This will store the object as environments/accounts/$application_name/${workspace}/terraform.tfstate
}
}
}

0 comments on commit 19a95a2

Please sign in to comment.