Skip to content
Draft
10 changes: 10 additions & 0 deletions terraform/deployments/chat/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ terraform {

provider "aws" {
region = var.aws_region
default_tags {
tags = {
product = "govuk"
system = "govuk-chat"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform-deployment = basename(abspath(path.root))
}
}
}

locals {
Expand Down
11 changes: 6 additions & 5 deletions terraform/deployments/cloudfront/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ provider "aws" {
region = var.aws_region
default_tags {
tags = {
Product = "GOV.UK"
System = "CloudFront"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "cloudfront"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions terraform/deployments/cluster-infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "EKS cluster infrastructure"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
cluster = var.cluster_name
product = "govuk"
system = "govuk-platform-engineering"
service = "eks"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions terraform/deployments/cluster-services/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "EKS cluster services"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
cluster = "govuk"
product = "govuk"
system = "govuk-platform-engineering"
service = "eks-cluster-services"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions terraform/deployments/csp-reporter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ provider "aws" {
region = var.aws_region
default_tags {
tags = {
Product = "GOV.UK"
System = "CSP Reporter"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-csp-reporter"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
cluster = "govuk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
21 changes: 10 additions & 11 deletions terraform/deployments/datagovuk-infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,20 @@ locals {
cluster_id = data.tfe_outputs.cluster_infrastructure.nonsensitive_values.cluster_id
services_ns = data.tfe_outputs.cluster_infrastructure.nonsensitive_values.cluster_services_namespace
oidc_provider = data.tfe_outputs.cluster_infrastructure.nonsensitive_values.cluster_oidc_provider

default_tags = {
Product = "DATA.GOV.UK"
System = "DATA.GOV.UK"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
project = "replatforming"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
}
}

provider "aws" {
region = "eu-west-1"
default_tags { tags = local.default_tags }
default_tags {
tags = {
product = "govuk"
system = "govuk-dgu"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform-deployment = basename(abspath(path.root))
}
}
}

data "aws_eks_cluster_auth" "cluster_token" {
Expand Down
11 changes: 6 additions & 5 deletions terraform/deployments/ecr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "Elastic Container Registry"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "ecr"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions terraform/deployments/elasticache/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "GOVUK ElastiCache"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "elasticache"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
9 changes: 5 additions & 4 deletions terraform/deployments/github/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ provider "aws" {

default_tags {
tags = {
Product = "GOV.UK"
System = "GitHub"
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "github"
environment = "production"
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ locals {
private_subnet_ids = [for name, subnet in data.tfe_outputs.vpc.nonsensitive_values.private_subnet_ids : subnet if contains(local.target_private_subnets, name)]

default_tags = {
Product = "GOV.UK"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-publishing"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}

Expand Down
14 changes: 8 additions & 6 deletions terraform/deployments/logging/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "Logging"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "logging"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
}
Expand All @@ -30,8 +31,9 @@ provider "aws" {

provider "google" {
default_labels = {
product = "gov-uk"
system = "terraform-cloud"
product = "govuk"
system = "govuk-platform-engineering"
service = "logging"
environment = var.govuk_environment
owner = "govuk-platform-engineering"
repository = "govuk-infrastructure"
Expand Down
10 changes: 5 additions & 5 deletions terraform/deployments/mobile-backend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "GOV.UK App"
Environment = var.govuk_environment
Owner = "govuk-app-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-app"
environment = var.govuk_environment
owner = "govuk-app-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions terraform/deployments/opensearch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ terraform {

provider "aws" {
region = var.aws_region
default_tags {
tags = {
product = "govuk"
system = "govuk-chat"
service = "opensearch"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform-deployment = basename(abspath(path.root))
}
}
}

locals {
Expand Down
11 changes: 6 additions & 5 deletions terraform/deployments/rds/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ provider "aws" {
region = var.aws_region
default_tags {
tags = {
Product = "GOV.UK"
System = "EKS RDS"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "rds"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
cluster = "govuk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
21 changes: 19 additions & 2 deletions terraform/deployments/rds/rds.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ resource "aws_db_instance" "instance" {
final_snapshot_identifier = "${each.value.name}-final-snapshot"
skip_final_snapshot = var.skip_final_snapshot

tags = { Name = "govuk-rds-${each.value.name}-${each.value.engine}", project = lookup(each.value, "project", "GOV.UK - Other") }
tags = {
Name = "govuk-rds-${each.value.name}-${each.value.engine}" # Keep this as I'm not sure what it's used for
product = "govuk"
system = "govuk-${each.value.name}"
service = "rds-${each.value.engine}"
environment = var.govuk_environment
owner = "${each.value.name}"
repository = "govuk-infrastructure"
}

lifecycle { ignore_changes = [identifier] }
}
Expand Down Expand Up @@ -140,7 +148,16 @@ resource "aws_db_instance" "replica" {

skip_final_snapshot = true

tags = { Name = "govuk-rds-${each.value.name}-${each.value.engine}-replica", project = lookup(each.value, "project", "GOV.UK - Other") }
tags = {
Name = "govuk-rds-${each.value.name}-${each.value.engine}" # Keep this as I'm not sure what it's used for
product = "govuk"
system = "govuk-${each.value.name}"
service = "rds-${each.value.engine}"
environment = var.govuk_environment
owner = "${each.value.name}"
repository = "govuk-infrastructure"
}


lifecycle { ignore_changes = [identifier] }
}
Expand Down
10 changes: 5 additions & 5 deletions terraform/deployments/release/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "EKS release assumer"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-release"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
cluster = "govuk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
11 changes: 6 additions & 5 deletions terraform/deployments/root-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ provider "aws" {
region = var.aws_region
default_tags {
tags = {
Product = "GOV.UK"
System = "DNS"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "dns"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
11 changes: 6 additions & 5 deletions terraform/deployments/security/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "Security"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "security"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
11 changes: 6 additions & 5 deletions terraform/deployments/tfc-aws-config/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ provider "aws" {
region = "eu-west-1"
default_tags {
tags = {
Product = "GOV.UK"
System = "Terraform Cloud"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "tfc-aws-config"
environment = var.govuk_environment
owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
terraform-deployment = basename(abspath(path.root))
}
}
}
Expand Down
Loading
Loading