Skip to content

Commit f9c41d5

Browse files
CCM-8197: Cross Account Observability
1 parent 2b095cc commit f9c41d5

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

infrastructure/modules/observability-datasource/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
| <a name="input_observability_account_id"></a> [observability\_account\_id](#input\_observability\_account\_id) | The Observability Account ID that needs access | `string` | n/a | yes |
2323
| <a name="input_project"></a> [project](#input\_project) | The name of the terraformscaffold project calling the module | `string` | n/a | yes |
2424
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
25+
| <a name="input_resource_types"></a> [resource\_types](#input\_resource\_types) | The resource types to include in the OAM link. | `list(string)` | <pre>[<br/> "AWS::CloudWatch::Metric",<br/> "AWS::Logs::LogGroup"<br/>]</pre> | no |
2526
## Modules
2627

2728
No modules.

infrastructure/modules/observability-datasource/oam_link_cross_account_obs.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
resource "aws_oam_link" "cross_account_obs" {
22
label_template = "$AccountName"
3-
resource_types = [
4-
"AWS::CloudWatch::Metric",
5-
"AWS::Logs::LogGroup"
6-
]
3+
resource_types = var.resource_types
74
sink_identifier = "arn:aws:oam:${var.region}:${var.observability_account_id}:sink/${var.oam_sink_id}"
85
tags = var.default_tags
96

infrastructure/modules/observability-datasource/variables.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,12 @@ variable "metric_configuration" {
7171
})
7272
default = null
7373
}
74+
75+
variable "resource_types" {
76+
type = list(string)
77+
description = "The resource types to include in the OAM link."
78+
default = [
79+
"AWS::CloudWatch::Metric",
80+
"AWS::Logs::LogGroup"
81+
]
82+
}

0 commit comments

Comments
 (0)