Skip to content

Commit cdc870e

Browse files
authored
fix: Change cloudwatch log group output to include all created log groups (#19)
1 parent aaf3837 commit cdc870e

File tree

14 files changed

+32
-60
lines changed

14 files changed

+32
-60
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ No modules.
473473
|------|-------------|
474474
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
475475
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
476+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
476477
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
477478
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
478479
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/memcached-cluster/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ No inputs.
5050

5151
| Name | Description |
5252
|------|-------------|
53-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
54-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
53+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
5554
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
5655
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
5756
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/memcached-cluster/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.elasticache.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.elasticache.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.elasticache.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: examples/redis-cluster-mode/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ No inputs.
5252

5353
| Name | Description |
5454
|------|-------------|
55-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
56-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
55+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
5756
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
5857
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
5958
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/redis-cluster-mode/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.elasticache.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.elasticache.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.elasticache.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: examples/redis-cluster/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ No inputs.
5050

5151
| Name | Description |
5252
|------|-------------|
53-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
54-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
53+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
5554
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
5655
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
5756
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/redis-cluster/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.elasticache.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.elasticache.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.elasticache.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: examples/redis-global-replication-group/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ No inputs.
5757

5858
| Name | Description |
5959
|------|-------------|
60-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
61-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
60+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
6261
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
6362
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
6463
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/redis-global-replication-group/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.elasticache_primary.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.elasticache_primary.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.elasticache_primary.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: examples/redis-replication-group-with-cluster-replica/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ No inputs.
5151

5252
| Name | Description |
5353
|------|-------------|
54-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
55-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
54+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
5655
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
5756
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
5857
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/redis-replication-group-with-cluster-replica/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.replication_group_with_cluster_replica.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.replication_group_with_cluster_replica.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.replication_group_with_cluster_replica.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: examples/redis-replication-group/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ No inputs.
4949

5050
| Name | Description |
5151
|------|-------------|
52-
| <a name="output_cloudwatch_log_group_arn"></a> [cloudwatch\_log\_group\_arn](#output\_cloudwatch\_log\_group\_arn) | Arn of cloudwatch log group created |
53-
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of cloudwatch log group created |
52+
| <a name="output_cloudwatch_log_groups"></a> [cloudwatch\_log\_groups](#output\_cloudwatch\_log\_groups) | Map of CloudWatch log groups created and their attributes |
5453
| <a name="output_cluster_address"></a> [cluster\_address](#output\_cluster\_address) | (Memcached only) DNS name of the cache cluster without the port appended |
5554
| <a name="output_cluster_arn"></a> [cluster\_arn](#output\_cluster\_arn) | The ARN of the ElastiCache Cluster |
5655
| <a name="output_cluster_cache_nodes"></a> [cluster\_cache\_nodes](#output\_cluster\_cache\_nodes) | List of node objects including `id`, `address`, `port` and `availability_zone` |

Diff for: examples/redis-replication-group/outputs.tf

+3-8
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,9 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97-
output "cloudwatch_log_group_name" {
98-
description = "Name of cloudwatch log group created"
99-
value = module.elasticache.cloudwatch_log_group_name
100-
}
101-
102-
output "cloudwatch_log_group_arn" {
103-
description = "Arn of cloudwatch log group created"
104-
value = module.elasticache.cloudwatch_log_group_arn
97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = module.elasticache.cloudwatch_log_groups
105100
}
106101

107102
################################################################################

Diff for: outputs.tf

+7
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,18 @@ output "global_replication_group_node_groups" {
9494
# CloudWatch Log Group
9595
################################################################################
9696

97+
output "cloudwatch_log_groups" {
98+
description = "Map of CloudWatch log groups created and their attributes"
99+
value = aws_cloudwatch_log_group.this
100+
}
101+
102+
# TODO - remove at next breaking change
97103
output "cloudwatch_log_group_name" {
98104
description = "Name of cloudwatch log group created"
99105
value = try(aws_cloudwatch_log_group.this[0].name, null)
100106
}
101107

108+
# TODO - remove at next breaking change
102109
output "cloudwatch_log_group_arn" {
103110
description = "Arn of cloudwatch log group created"
104111
value = try(aws_cloudwatch_log_group.this[0].arn, null)

0 commit comments

Comments
 (0)