Skip to content

Commit

Permalink
Merge branch 'main' into oasys-san-test
Browse files Browse the repository at this point in the history
  • Loading branch information
wullub authored Jan 7, 2025
2 parents 72facdf + 06496e7 commit d415804
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@
"dps-inc-reporting",
"dps-csip",
"dps-alerts",
"dps-use-of-force",
"dps-locations",
"dps-testing"
],
"alarms": {
Expand Down Expand Up @@ -284,7 +286,9 @@
"dps-basm",
"dps-inc-reporting",
"dps-csip",
"dps-alerts"
"dps-alerts",
"dps-use-of-force",
"dps-locations"
],
"alarms": {
"setup_cw_alarms": true,
Expand Down Expand Up @@ -469,7 +473,9 @@
"dps-basm",
"dps-inc-reporting",
"dps-csip",
"dps-alerts"
"dps-alerts",
"dps-use-of-force",
"dps-locations"
],
"alarms": {
"setup_cw_alarms": true,
Expand Down Expand Up @@ -670,7 +676,9 @@
"dps-basm",
"dps-inc-reporting",
"dps-csip",
"dps-alerts"
"dps-alerts",
"dps-use-of-force",
"dps-locations"
],
"alarms": {
"setup_cw_alarms": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,13 @@ locals {
amazon_prometheus_query_enabled = false
xray_enabled = false
athena_enabled = false
},
"modernisation-platform" = {
cloudwatch_enabled = true
prometheus_push_enabled = false
amazon_prometheus_query_enabled = false
xray_enabled = false
athena_enabled = false
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ data "aws_iam_policy_document" "amazon_managed_grafana_remote_cloudwatch" {
effect = "Allow"
actions = ["sts:AssumeRole"]
resources = [
for account in local.all_aws_accounts : format("arn:aws:iam::%s:role/observability-platform", local.environment_management.account_ids[account])
for account in local.all_aws_accounts : format(
"arn:aws:iam::%s:role/observability-platform",
account == "modernisation-platform" ? local.environment_management.modernisation_platform_account_id : local.environment_management.account_ids[account]
)
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "cloudwatch_source" {
source = "../../grafana/cloudwatch-source"

name = each.key
account_id = var.environment_management.account_ids[each.key]
account_id = try(each.key == "modernisation-platform" ? var.environment_management.modernisation_platform_account_id : var.environment_management.account_ids[each.key], var.environment_management.account_ids[each.key])
cloudwatch_custom_namespaces = try(each.value.cloudwatch_custom_namespaces, null)
xray_enabled = try(each.value.xray_enabled, false)

Expand All @@ -32,7 +32,7 @@ module "amazon_prometheus_query_source" {
source = "../../grafana/amazon-prometheus-query-source"

name = each.key
account_id = var.environment_management.account_ids[each.key]
account_id = try(each.key == "modernisation-platform" ? var.environment_management.modernisation_platform_account_id : var.environment_management.account_ids[each.key], var.environment_management.account_ids[each.key])
amazon_prometheus_workspace_region = try(each.value.amazon_prometheus_workspace_region, "eu-west-2")
amazon_prometheus_workspace_id = each.value.amazon_prometheus_workspace_id
}
Expand Down Expand Up @@ -71,7 +71,7 @@ module "prometheus_push" {
source = "../../prometheus/iam-role"

name = each.key
account_id = var.environment_management.account_ids[each.key]
account_id = try(each.key == "modernisation-platform" ? var.environment_management.modernisation_platform_account_id : var.environment_management.account_ids[each.key], var.environment_management.account_ids[each.key])
}

module "team" {
Expand Down

0 comments on commit d415804

Please sign in to comment.