File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
infrastructure/terraform/components Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,3 @@ variable "initial_cli_secrets_provision_override" {
7070 # Usage like:
7171 # ... -a apply -- -var initial_cli_secrets_provision_override={\"github_pat\":\"l0ngstr1ng"}
7272}
73-
74- variable "observability_account_id" {
75- type = string
76- description = " The Observability Account ID that needs access"
77- }
Original file line number Diff line number Diff line change 11resource "aws_iam_role" "grafana_access" {
2- name = " ${ local . csi } -grafana-cross-access-role"
2+ name = replace ( " ${ local . csi } -grafana-cross-access-role" , " - ${ var . component } " , " " )
33 assume_role_policy = data. aws_iam_policy_document . observability_grafana_role_assume_role_policy . json
44}
55
@@ -9,7 +9,17 @@ data "aws_iam_policy_document" "observability_grafana_role_assume_role_policy" {
99 effect = " Allow"
1010 principals {
1111 type = " AWS"
12- identifiers = [" arn:aws:iam::${ var . observability_account_id } :role/${ local . csi } -grafana-workspace-role" ]
12+ identifiers = [
13+ " arn:aws:iam::${ var . observability_account_id } :root"
14+ ]
15+ }
16+ condition {
17+ test = " ArnLike"
18+ variable = " aws:PrincipalArn"
19+
20+ values = [
21+ " arn:aws:iam::${ var . observability_account_id } :role/*grafana-workspace-role"
22+ ]
1323 }
1424 }
1525}
Original file line number Diff line number Diff line change @@ -187,3 +187,8 @@ variable "enable_letters" {
187187 description = " Feature flag for letters"
188188 default = false
189189}
190+
191+ variable "observability_account_id" {
192+ type = string
193+ description = " The Observability Account ID that needs access"
194+ }
You can’t perform that action at this time.
0 commit comments