Skip to content

Commit d11e0c7

Browse files
Merge pull request #3777 from nhsuk/dms_ecs_switchover_config
Intermediate migration configuration
2 parents aadf76a + 36dad1e commit d11e0c7

File tree

4 files changed

+34
-11
lines changed

4 files changed

+34
-11
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"Version": "2012-10-17",
3+
"Statement": [
4+
{
5+
"Sid": "Statement1",
6+
"Effect": "Allow",
7+
"Action": [
8+
"dms:CreateDataMigration",
9+
"dms:CreateEndpoint",
10+
"dms:CreateReplicationConfig",
11+
"dms:CreateReplicationInstance",
12+
"dms:CreateReplicationSubnetGroup",
13+
"dms:CreateReplicationTask",
14+
"dms:DeleteEndpoint",
15+
"dms:DeleteReplicationConfig",
16+
"dms:DeleteReplicationInstance",
17+
"dms:DeleteReplicationTask",
18+
"dms:DeleteReplicationSubnetGroup",
19+
"dms:ModifyEndpoint",
20+
"dms:ModifyReplicationConfig",
21+
"dms:ModifyReplicationTask",
22+
"dms:ModifyReplicationInstance",
23+
"dms:ModifyReplicationSubnetGroup"
24+
],
25+
"Resource": ["*"]
26+
}
27+
]
28+
}

terraform/app/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ output "ecs_variables" {
3636

3737
output "db_secret_arn" {
3838
description = "The ARN of the secret containing the DB credentials."
39-
value = var.db_secret_arn == null ? aws_rds_cluster.aurora_cluster.master_user_secret[0].secret_arn : var.db_secret_arn
39+
value = aws_rds_cluster.core.master_user_secret[0].secret_arn
4040
}

terraform/app/rds.tf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,9 @@ resource "aws_rds_cluster_parameter_group" "migration_target" {
116116

117117
parameter {
118118
name = "session_replication_role"
119-
value = "replica"
119+
value = "origin"
120120
apply_method = "immediate"
121121
}
122-
parameter {
123-
name = "max_wal_senders"
124-
value = 20
125-
apply_method = "pending-reboot"
126-
}
127122
}
128123

129124
resource "aws_rds_cluster" "core" {

terraform/app/variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ locals {
180180
task_envs = [
181181
{
182182
name = "DB_HOST"
183-
value = aws_rds_cluster.aurora_cluster.endpoint
183+
value = aws_rds_cluster.core.endpoint
184184
},
185185
{
186186
name = "DB_NAME"
187-
value = aws_rds_cluster.aurora_cluster.database_name
187+
value = aws_rds_cluster.core.database_name
188188
},
189189
{
190190
name = "RAILS_ENV"
@@ -217,8 +217,8 @@ locals {
217217
]
218218
task_secrets = concat([
219219
{
220-
name = var.db_secret_arn == null ? "DB_CREDENTIALS" : "DB_SECRET"
221-
valueFrom = var.db_secret_arn == null ? aws_rds_cluster.aurora_cluster.master_user_secret[0].secret_arn : var.db_secret_arn
220+
name = "DB_CREDENTIALS"
221+
valueFrom = aws_rds_cluster.core.master_user_secret[0].secret_arn
222222
},
223223
{
224224
name = "RAILS_MASTER_KEY"

0 commit comments

Comments
 (0)