Opinionated.tf/cloud/aws/rds/serverless/endpoints.tf
2024-12-26 23:35:55 +01:00

12 lines
454 B
HCL

resource "aws_rds_cluster_endpoint" "endpoint" {
depends_on = [aws_rds_cluster_instance.instance]
for_each = { "write" = "ANY", "read" = "READER" }
cluster_endpoint_identifier = join("-", [local.sanitised_name, each.key, "endpoint"])
cluster_identifier = aws_rds_cluster.cluster.id
custom_endpoint_type = each.value
tags = merge(
try(var.application.application_tag, {}),
{}
)
}