From bb9692dbeb5769cbf5dbf5ff39cc6e69bfa83843 Mon Sep 17 00:00:00 2001 From: Jacob Woffenden Date: Thu, 14 Mar 2024 16:19:49 +0000 Subject: [PATCH] Add Observability Platform Signed-off-by: Jacob Woffenden --- .../application_variables.json | 12 ++++-------- .../observability-platform.tf | 9 +++++++++ .../analytical-platform-ingestion/vpc.tf | 8 ++++---- 3 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 terraform/environments/analytical-platform-ingestion/observability-platform.tf diff --git a/terraform/environments/analytical-platform-ingestion/application_variables.json b/terraform/environments/analytical-platform-ingestion/application_variables.json index 6a51e1c7d04..9640b8793ea 100644 --- a/terraform/environments/analytical-platform-ingestion/application_variables.json +++ b/terraform/environments/analytical-platform-ingestion/application_variables.json @@ -1,16 +1,12 @@ { "accounts": { "development": { - "vpc_cidr": "10.0.0.0/16" - }, - "test": { - "vpc_cidr": "10.0.0.0/16" - }, - "preproduction": { - "vpc_cidr": "10.0.0.0/16" + "vpc_cidr": "10.0.0.0/16", + "observability_platform": "development" }, "production": { - "vpc_cidr": "10.0.0.0/16" + "vpc_cidr": "10.0.0.0/16", + "observability_platform": "production" } } } diff --git a/terraform/environments/analytical-platform-ingestion/observability-platform.tf b/terraform/environments/analytical-platform-ingestion/observability-platform.tf new file mode 100644 index 00000000000..01f4e7d6ad7 --- /dev/null +++ b/terraform/environments/analytical-platform-ingestion/observability-platform.tf @@ -0,0 +1,9 @@ +module "observability_platform_tenant" { + source = "ministryofjustice/observability-platform-tenant/aws" + version = "1.0.0" + + observability_platform_account_id = local.environment_management.account_ids["observability-platform-${local.application_data.accounts[local.environment].observability_platform}"] + enable_xray = true + + tags = local.tags +} \ No newline at end of file diff --git a/terraform/environments/analytical-platform-ingestion/vpc.tf b/terraform/environments/analytical-platform-ingestion/vpc.tf index 0197f9abd1c..1646dc6506e 100644 --- a/terraform/environments/analytical-platform-ingestion/vpc.tf +++ b/terraform/environments/analytical-platform-ingestion/vpc.tf @@ -27,16 +27,16 @@ module "vpc_endpoints" { endpoints = { logs = { - service = "logs" - service_type = "Interface" + service = "logs" + service_type = "Interface" tags = merge( local.tags, { Name = format("%s-logs-api-vpc-endpoint", local.application_name) } ) }, sts = { - service = "sts" - service_type = "Interface" + service = "sts" + service_type = "Interface" tags = merge( local.tags, { Name = format("%s-sts-vpc-endpoint", local.application_name) }