Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Add outputs for the monitoring role arn (terraform-aws-modules#181)
Browse files Browse the repository at this point in the history
* add outputs for the monitoring role arn

* add outputs for the monitoring role arn

* Fixed value in outputs

Co-authored-by: Anton Babenko <[email protected]>
  • Loading branch information
SolidSly and antonbabenko committed Jan 7, 2020
1 parent b2fc948 commit 1d51b8f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ module "db" {

| Name | Description |
|------|-------------|
| enhanced\_monitoring\_iam\_role\_arn | The Amazon Resource Name \(ARN\) specifying the monitoring role |
| enhanced\_monitoring\_iam\_role\_name | The name of the monitoring role |
| this\_db\_instance\_address | The address of the RDS instance |
| this\_db\_instance\_arn | The ARN of the RDS instance |
| this\_db\_instance\_availability\_zone | The availability zone of the RDS instance |
Expand Down
2 changes: 2 additions & 0 deletions modules/db_instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@

| Name | Description |
|------|-------------|
| enhanced\_monitoring\_iam\_role\_arn | The Amazon Resource Name \(ARN\) specifying the monitoring role |
| enhanced\_monitoring\_iam\_role\_name | The name of the monitoring role |
| this\_db\_instance\_address | The address of the RDS instance |
| this\_db\_instance\_arn | The ARN of the RDS instance |
| this\_db\_instance\_availability\_zone | The availability zone of the RDS instance |
Expand Down
12 changes: 12 additions & 0 deletions modules/db_instance/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
locals {
enhanced_monitoring_iam_role_name = element(concat(aws_iam_role.enhanced_monitoring.*.name, [""]), 0)
enhanced_monitoring_iam_role_arn = element(concat(aws_iam_role.enhanced_monitoring.*.arn, [""]), 0)
this_db_instance_address = element(concat(aws_db_instance.this_mssql.*.address, aws_db_instance.this.*.address, [""]), 0)
this_db_instance_arn = element(concat(aws_db_instance.this_mssql.*.arn, aws_db_instance.this.*.arn, [""]), 0)
this_db_instance_availability_zone = element(concat(aws_db_instance.this_mssql.*.availability_zone, aws_db_instance.this.*.availability_zone, [""]), 0)
Expand All @@ -13,6 +15,16 @@ locals {
this_db_instance_ca_cert_identifier = element(concat(aws_db_instance.this_mssql.*.ca_cert_identifier, aws_db_instance.this.*.ca_cert_identifier, [""]), 0)
}

output "enhanced_monitoring_iam_role_name" {
description = "The name of the monitoring role"
value = local.enhanced_monitoring_iam_role_name
}

output "enhanced_monitoring_iam_role_arn" {
description = "The Amazon Resource Name (ARN) specifying the monitoring role"
value = local.enhanced_monitoring_iam_role_arn
}

output "this_db_instance_address" {
description = "The address of the RDS instance"
value = local.this_db_instance_address
Expand Down
10 changes: 10 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
output "enhanced_monitoring_iam_role_name" {
description = "The name of the monitoring role"
value = module.db_instance.enhanced_monitoring_iam_role_name
}

output "enhanced_monitoring_iam_role_arn" {
description = "The Amazon Resource Name (ARN) specifying the monitoring role"
value = module.db_instance.enhanced_monitoring_iam_role_arn
}

output "this_db_instance_address" {
description = "The address of the RDS instance"
value = module.db_instance.this_db_instance_address
Expand Down

0 comments on commit 1d51b8f

Please sign in to comment.