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
22 changes: 13 additions & 9 deletions terraform/deployments/cluster-infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ locals {
secrets_prefix = "govuk"
monitoring_namespace = "monitoring"

default_tags = {
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))
}

default_cluster_addons = {
coredns = { most_recent = true }
kube-proxy = { most_recent = true }
Expand Down Expand Up @@ -118,15 +128,9 @@ locals {
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
repository = "govuk-infrastructure"
terraform_deployment = basename(abspath(path.root))
}
tags = merge(local.default_tags, {
cluster = var.cluster_name
})
}
}

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
13 changes: 13 additions & 0 deletions terraform/deployments/opensearch/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,22 @@ terraform {

provider "aws" {
region = var.aws_region
default_tags {
tags = local.default_tags
}
}

locals {
default_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))
}

domain = "${var.service}-engine"
subnet_ids = data.terraform_remote_state.infra_networking.outputs.private_subnet_rds_ids
master_user = "${var.service}-masteruser"
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))
}
}
}
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
11 changes: 6 additions & 5 deletions terraform/deployments/vpc/main.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 = "VPC"
Environment = var.govuk_environment
Owner = "govuk-platform-engineering@digital.cabinet-office.gov.uk"
product = "govuk"
system = "govuk-platform-engineering"
service = "vpc"
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