Skip to content

Commit

Permalink
Merge pull request #7439 from ministryofjustice/chore/op-updates
Browse files Browse the repository at this point in the history
📌 Observability Platform updates
  • Loading branch information
Jacob Woffenden authored Aug 19, 2024
2 parents 7f09966 + 22841fe commit 78b1a45
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ locals {
}
}
}
grafana_api_key_rotator_version = "1.0.5"
grafana_version = "10.4"
grafana_api_key_rotator_version = "1.0.10"
}
production = {
tenant_configuration = {
Expand Down Expand Up @@ -141,7 +142,8 @@ locals {
}
}
}
grafana_api_key_rotator_version = "1.0.5"
grafana_version = "10.4"
grafana_api_key_rotator_version = "1.0.10"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module "amazon_managed_grafana_remote_cloudwatch_iam_policy" {
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions

source = "terraform-aws-modules/iam/aws//modules/iam-policy"
version = "5.39.1"
version = "5.44.0"

name_prefix = "amazon-managed-grafana-remote-cloudwatch"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module "grafana_api_key_rotator" {
#checkov:skip=CKV_AWS_258:Function is not invoked by URL

source = "terraform-aws-modules/lambda/aws"
version = "7.7.0"
version = "7.7.1"

publish = true
create_package = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ module "managed_grafana" {

name = local.application_name

license_type = "ENTERPRISE"
license_type = "ENTERPRISE"
grafana_version = local.environment_configuration.grafana_version

account_access_type = "CURRENT_ACCOUNT"
authentication_providers = ["AWS_SSO"]
Expand Down Expand Up @@ -40,6 +41,12 @@ module "managed_grafana" {
tags = local.tags
}

resource "aws_grafana_workspace_service_account" "automation" {
name = "automation"
grafana_role = "ADMIN"
workspace_id = module.managed_grafana.workspace_id
}

/* Slack Contact Points */
module "contact_point_slack" {
for_each = toset(local.all_slack_channels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data "grafana_data_source" "cloudwatch" {
resource "grafana_data_source_permission" "cloudwatch" {
for_each = var.aws_accounts

datasource_id = data.grafana_data_source.cloudwatch[each.key].id
datasource_uid = trimprefix(data.grafana_data_source.cloudwatch[each.key].id, "1:")

permissions {
team_id = grafana_team.this.id
Expand All @@ -47,7 +47,7 @@ resource "grafana_data_source_permission" "xray" {
for name, account in var.aws_accounts : name => account if account.xray_enabled
}

datasource_id = data.grafana_data_source.xray[each.key].id
datasource_uid = trimprefix(data.grafana_data_source.xray[each.key].id, "1:")

permissions {
team_id = grafana_team.this.id
Expand All @@ -68,7 +68,7 @@ resource "grafana_data_source_permission" "amazon_prometheus" {
for name, account in var.aws_accounts : name => account if account.amazon_prometheus_query_enabled
}

datasource_id = data.grafana_data_source.amazon_prometheus[each.key].id
datasource_uid = trimprefix(data.grafana_data_source.amazon_prometheus[each.key].id, "1:")

permissions {
team_id = grafana_team.this.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = "~> 2.0"
version = "~> 3.0"
}
}
required_version = "~> 1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "iam_policy" {
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions

source = "terraform-aws-modules/iam/aws//modules/iam-policy"
version = "5.39.1"
version = "5.44.0"

name_prefix = "${var.name}-prometheus"

Expand All @@ -33,7 +33,7 @@ module "iam_role" {
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions

source = "terraform-aws-modules/iam/aws//modules/iam-assumable-role"
version = "5.39.1"
version = "5.44.0"

create_role = true
role_name = "${var.name}-prometheus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ terraform {
}
grafana = {
source = "grafana/grafana"
version = "2.5.0"
version = "~> 3.0"
}
http = {
version = "~> 3.0"
Expand Down

0 comments on commit 78b1a45

Please sign in to comment.