Skip to content

Commit 6263be9

Browse files
committed
CCM-9868: Adding oam ssm lookup
1 parent 141816e commit 6263be9

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

infrastructure/terraform/components/acct/module_obs_datasource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ module "obs_datasource" {
99
environment = var.environment
1010
component = var.component
1111

12-
oam_sink_id = var.oam_sink_id
12+
oam_sink_id = data.aws_ssm_parameter.oam_sink_id.value
1313
observability_account_id = var.observability_account_id
1414
}

infrastructure/terraform/components/acct/provider_aws.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,17 @@ provider "aws" {
2222
var.aws_account_id,
2323
]
2424
}
25+
26+
provider "aws" {
27+
alias = "obs"
28+
region = var.region
29+
30+
assume_role {
31+
role_arn = "arn:aws:iam::${var.observability_account_id}:role/${local.bootstrap.iam_github_deploy_role["name"]}"
32+
session_name = local.csi
33+
}
34+
35+
default_tags {
36+
tags = local.default_tags
37+
}
38+
}

infrastructure/terraform/components/acct/ssm_parameter_github_pat.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ resource "aws_ssm_parameter" "github_pat" {
99
}
1010
}
1111

12+
data "aws_ssm_parameter" "oam_sink_id" {
13+
provider = aws.obs
14+
name = "/oam/sink_id"
15+
}
16+
1217
# This can be set at provision time like:
1318
# PARAM_OBJECT=$(jq -n \
1419
# --arg github_pat "github_pat_123abc" \

0 commit comments

Comments
 (0)