From 51545c21fa9918a9d1187db3a9a81aeead618be1 Mon Sep 17 00:00:00 2001 From: Felix Bechstein Date: Fri, 24 Apr 2020 11:31:57 +0200 Subject: [PATCH 1/5] output aws_rds_cluster.this.hosted_zone_id This allows setting route53 aliases. --- outputs.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/outputs.tf b/outputs.tf index 519eeeb..fa285fd 100644 --- a/outputs.tf +++ b/outputs.tf @@ -52,6 +52,10 @@ output "this_rds_cluster_instance_endpoints" { value = aws_rds_cluster_instance.this.*.endpoint } +output "this_rds_cluster_hosted_zone_id" { + value = aws_rds_cluster.this.hosted_zone_id +} + // aws_security_group output "this_security_group_id" { description = "The security group ID of the cluster" From a2fd762dd79efbd524d3eec2dbd2962f582d3796 Mon Sep 17 00:00:00 2001 From: Felix Bechstein Date: Tue, 18 Aug 2020 20:01:53 +0200 Subject: [PATCH 2/5] Update outputs.tf --- outputs.tf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 89100f8..596e83d 100644 --- a/outputs.tf +++ b/outputs.tf @@ -58,7 +58,8 @@ output "this_rds_cluster_instance_ids" { } output "this_rds_cluster_hosted_zone_id" { - value = aws_rds_cluster.this.hosted_zone_id + description = "Route53 hosted zone id of the created cluster" + value = aws_rds_cluster.this[*].hosted_zone_id } // aws_security_group From da8f37d63532a91e39546786f6319b4413d5fc76 Mon Sep 17 00:00:00 2001 From: Felix Bechstein Date: Wed, 19 Aug 2020 09:44:37 +0200 Subject: [PATCH 3/5] Update outputs.tf Co-authored-by: Bryant Biggs --- outputs.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 596e83d..baf2dd8 100644 --- a/outputs.tf +++ b/outputs.tf @@ -59,7 +59,7 @@ output "this_rds_cluster_instance_ids" { output "this_rds_cluster_hosted_zone_id" { description = "Route53 hosted zone id of the created cluster" - value = aws_rds_cluster.this[*].hosted_zone_id + value = aws_rds_cluster.this.hosted_zone_id } // aws_security_group From 9b3cb89eaaab1505bea237f4ae250cce355a961e Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Wed, 19 Aug 2020 14:11:11 +0200 Subject: [PATCH 4/5] Update outputs.tf --- outputs.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/outputs.tf b/outputs.tf index baf2dd8..4866e51 100644 --- a/outputs.tf +++ b/outputs.tf @@ -46,6 +46,11 @@ output "this_rds_cluster_master_username" { value = aws_rds_cluster.this.master_username } +output "this_rds_cluster_hosted_zone_id" { + description = "Route53 hosted zone id of the created cluster" + value = aws_rds_cluster.this.hosted_zone_id +} + // aws_rds_cluster_instance output "this_rds_cluster_instance_endpoints" { description = "A list of all cluster instance endpoints" @@ -57,11 +62,6 @@ output "this_rds_cluster_instance_ids" { value = aws_rds_cluster_instance.this.*.id } -output "this_rds_cluster_hosted_zone_id" { - description = "Route53 hosted zone id of the created cluster" - value = aws_rds_cluster.this.hosted_zone_id -} - // aws_security_group output "this_security_group_id" { description = "The security group ID of the cluster" From 46c80da8d5f1f3738dab1cef85e1e8d4739ff266 Mon Sep 17 00:00:00 2001 From: Anton Babenko Date: Wed, 19 Aug 2020 14:12:17 +0200 Subject: [PATCH 5/5] Minor updates --- README.md | 1 + main.tf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f0d9235..feef800 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,7 @@ Terraform documentation is generated automatically using [pre-commit hooks](http | this\_rds\_cluster\_arn | The ID of the cluster | | this\_rds\_cluster\_database\_name | Name for an automatically created database on cluster creation | | this\_rds\_cluster\_endpoint | The cluster endpoint | +| this\_rds\_cluster\_hosted\_zone\_id | Route53 hosted zone id of the created cluster | | this\_rds\_cluster\_id | The ID of the cluster | | this\_rds\_cluster\_instance\_endpoints | A list of all cluster instance endpoints | | this\_rds\_cluster\_instance\_ids | A list of all cluster instance ids | diff --git a/main.tf b/main.tf index 138038a..b588412 100644 --- a/main.tf +++ b/main.tf @@ -129,7 +129,7 @@ resource "aws_iam_role" "rds_enhanced_monitoring" { assume_role_policy = data.aws_iam_policy_document.monitoring_rds_assume_role.json permissions_boundary = var.permissions_boundary - + tags = merge(var.tags, { Name = local.name })