Skip to content

Commit 692a989

Browse files
committed
Temporarily rename dynamodb_table
We'll want to delete the dynamodb tables after we have enabled native state locking. For now we are renaming them with a default value so that they do not depend on values we have removed. This PR makes sure that the policies are still allowed to modify the dynamodb tables
1 parent 5b1fc2c commit 692a989

5 files changed

Lines changed: 5 additions & 3 deletions

File tree

infra/deployments/deploy/engineer-access/roles.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module "engineer_access" {
1010
env_name = "deploy"
1111
environment_type = "deploy"
1212
codestar_connection_arn = var.codestar_connection_arn
13-
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb::${var.deploy_account_id}:table/govuk-forms-deploy-tfstate-locking"
13+
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb::${var.deploy_account_id}:table/*"
1414
allow_ecs_task_usage = false
1515
allow_rds_data_api_access = false
1616

infra/deployments/forms/account/deployer-access.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module "deployer_access" {
1515
deploy_account_id = var.deploy_account_id
1616
hosted_zone_id = aws_route53_zone.public.id
1717
codestar_connection_arn = var.codestar_connection_arn
18-
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb:eu-west-2:${var.aws_account_id}:table/${local.dynamodb_table_name}"
18+
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb:eu-west-2:${var.aws_account_id}:table/*"
1919

2020
depends_on = [aws_route53_zone.public]
2121
}

infra/deployments/forms/account/engineer-access.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module "engineer_access" {
1313
pentester_cidrs = var.pentester_cidr_ranges
1414
vpn = var.require_vpn_to_access
1515
codestar_connection_arn = var.codestar_connection_arn
16-
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb:eu-west-2:${var.aws_account_id}:table/${local.dynamodb_table_name}"
16+
dynamodb_state_file_locks_table_arn = "arn:aws:dynamodb:eu-west-2:${var.aws_account_id}:table/*"
1717
allow_rds_data_api_access = true
1818
allow_ecs_task_usage = true
1919
}

infra/deployments/forms/account/inputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ variable "dynamodb_table" {
2828
description = "Name of the DynamoDB table used for state file locking. This is named to match the key in the S3 type backend"
2929
type = string
3030
nullable = false
31+
default = "tmp"
3132
}
3233

3334
variable "environment_name" {

infra/deployments/forms/inputs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ variable "dynamodb_table" {
5858
description = "Name of the DynamoDB table used for state file locking. This is named to match the key in the S3 type backend"
5959
type = string
6060
nullable = false
61+
default = "tmp"
6162
}
6263

6364
variable "dlq_arn" {

0 commit comments

Comments
 (0)