Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 1119] Finish deploying DMS resources 🎉 #1132

Merged
merged 4 commits into from
Feb 2, 2024
Merged

Conversation

coilysiren
Copy link
Collaborator

@coilysiren coilysiren commented Feb 2, 2024

Summary

Closes #1119

Time to review: 3 mins

Changes proposed

Random changes needed in order to get the terraform-created DMS configuration working

I've tested in the console and can confirm it to be full functional now!

# security group for the source DB
data "aws_security_group" "source_db" {
# security group for the DMS
data "aws_security_group" "dms" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly misleading name

@coilysiren coilysiren changed the title Dms deploy [Issue 1119] Finish deploying DMS resources 🎉 Feb 2, 2024
endpoint_type = "source"
engine_name = "oracle"
kms_key_arn = aws_kms_key.dms_endpoints.arn
ssl_mode = "none"
secrets_manager_access_role_arn = aws_iam_role.dms_access.arn
secrets_manager_arn = data.aws_secretsmanager_secret.source_db.arn
secrets_manager_arn = data.aws_secretsmanager_secret.source_db.id
Copy link
Collaborator Author

@coilysiren coilysiren Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It says "secrets_manager_arn" but recommendations I saw online said to use the id instead 🤷🏼‍♂️ 🤷🏼‍♀️ 🤷🏼

Comment on lines +12 to +16
resource "aws_dms_replication_subnet_group" "subnet" {
replication_subnet_group_description = "${var.environment_name} replication subnet group"
replication_subnet_group_id = "${var.environment_name}-replication-subnet-group"
subnet_ids = data.aws_subnets.all.ids
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why so many AWS services need their own special purpose subnets

Also not sure if this should be attached to all the subnets or just the private ones.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be better to add some of these services to preexisting subnet groups rather than creating their own? (e.g. all DMS and DB related resources in the same subnet groups)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aplybeah Yes but we're constrained by AWS's architecture here, which requires a specific DMS subnet. That's what this resource is for.

So this isn't anything we can change, more so it's a comment about the way AWS architects it's services. GCP does the opposite thing, where it almost always uses the standard VPC subnets that you provide.

Comment on lines +76 to +78
# Unfortunatly, the secret auto-generated by AWS RDS does not include the host and the port.
# So here we have created a new secret with the host and the port.
# docs: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tedious

@coilysiren coilysiren marked this pull request as ready for review February 2, 2024 01:03
@coilysiren coilysiren merged commit a1b836e into main Feb 2, 2024
7 checks passed
@coilysiren coilysiren deleted the dms-deploy branch February 2, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Deploy canonical DMS configuration via terraform
2 participants