From aa8019a29ec8632426fe364c6b18e1a1c262eedf Mon Sep 17 00:00:00 2001 From: Aga Dufrat Date: Fri, 9 Feb 2024 11:12:28 +0000 Subject: [PATCH] Remove fastly-datagovuk project It's been ported to https://github.com/alphagov/govuk-fastly --- terraform/projects/fastly-datagovuk/README.md | 59 -------- .../projects/fastly-datagovuk/datagovuk.vcl | 123 ---------------- .../fastly-datagovuk/datagovuk.vcl.tmp | 97 ------------- .../projects/fastly-datagovuk/datagovuk.vcle | 97 ------------- terraform/projects/fastly-datagovuk/fastly.sh | 23 --- .../integration.govuk.backend | 4 - terraform/projects/fastly-datagovuk/main.tf | 135 ------------------ .../fastly-datagovuk/production.govuk.backend | 4 - .../projects/fastly-datagovuk/remote_state.tf | 111 -------------- .../fastly-datagovuk/staging.govuk.backend | 4 - .../projects/fastly-datagovuk/variables.tf | 40 ------ 11 files changed, 697 deletions(-) delete mode 100644 terraform/projects/fastly-datagovuk/README.md delete mode 100644 terraform/projects/fastly-datagovuk/datagovuk.vcl delete mode 100644 terraform/projects/fastly-datagovuk/datagovuk.vcl.tmp delete mode 100644 terraform/projects/fastly-datagovuk/datagovuk.vcle delete mode 100644 terraform/projects/fastly-datagovuk/fastly.sh delete mode 100644 terraform/projects/fastly-datagovuk/integration.govuk.backend delete mode 100644 terraform/projects/fastly-datagovuk/main.tf delete mode 100644 terraform/projects/fastly-datagovuk/production.govuk.backend delete mode 100644 terraform/projects/fastly-datagovuk/remote_state.tf delete mode 100644 terraform/projects/fastly-datagovuk/staging.govuk.backend delete mode 100644 terraform/projects/fastly-datagovuk/variables.tf diff --git a/terraform/projects/fastly-datagovuk/README.md b/terraform/projects/fastly-datagovuk/README.md deleted file mode 100644 index 66feccf31..000000000 --- a/terraform/projects/fastly-datagovuk/README.md +++ /dev/null @@ -1,59 +0,0 @@ -## Project: fastly-datagovuk - -Manages the Fastly service for data.gov.uk - -## Requirements - -| Name | Version | -|------|---------| -| [terraform](#requirement\_terraform) | ~> 0.12.31 | -| [fastly](#requirement\_fastly) | ~> 0.26.0 | - -## Providers - -| Name | Version | -|------|---------| -| [external](#provider\_external) | n/a | -| [fastly](#provider\_fastly) | ~> 0.26.0 | -| [terraform](#provider\_terraform) | n/a | - -## Modules - -No modules. - -## Resources - -| Name | Type | -|------|------| -| [fastly_service_v1.datagovuk](https://registry.terraform.io/providers/hashicorp/fastly/latest/docs/resources/service_v1) | resource | -| [external_external.fastly](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/external) | data source | -| [terraform_remote_state.infra_monitoring](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | -| [terraform_remote_state.infra_networking](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | -| [terraform_remote_state.infra_root_dns_zones](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | -| [terraform_remote_state.infra_security_groups](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | -| [terraform_remote_state.infra_stack_dns_zones](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | -| [terraform_remote_state.infra_vpc](https://registry.terraform.io/providers/hashicorp/terraform/latest/docs/data-sources/remote_state) | data source | - -## Inputs - -| Name | Description | Type | Default | Required | -|------|-------------|------|---------|:--------:| -| [aws\_environment](#input\_aws\_environment) | AWS Environment | `string` | n/a | yes | -| [aws\_region](#input\_aws\_region) | AWS region | `string` | `"eu-west-1"` | no | -| [backend\_domain](#input\_backend\_domain) | The domain of the data.gov.uk PaaS instance to forward requests to | `string` | n/a | yes | -| [domain](#input\_domain) | The domain of the data.gov.uk service to manage | `string` | n/a | yes | -| [fastly\_api\_key](#input\_fastly\_api\_key) | API key to authenticate with Fastly | `string` | n/a | yes | -| [logging\_aws\_access\_key\_id](#input\_logging\_aws\_access\_key\_id) | IAM key ID with access to put logs into the S3 bucket | `string` | n/a | yes | -| [logging\_aws\_secret\_access\_key](#input\_logging\_aws\_secret\_access\_key) | IAM secret key with access to put logs into the S3 bucket | `string` | n/a | yes | -| [remote\_state\_bucket](#input\_remote\_state\_bucket) | S3 bucket we store our terraform state in | `string` | n/a | yes | -| [remote\_state\_infra\_monitoring\_key\_stack](#input\_remote\_state\_infra\_monitoring\_key\_stack) | Override stackname path to infra\_monitoring remote state | `string` | `""` | no | -| [remote\_state\_infra\_networking\_key\_stack](#input\_remote\_state\_infra\_networking\_key\_stack) | Override infra\_networking remote state path | `string` | `""` | no | -| [remote\_state\_infra\_root\_dns\_zones\_key\_stack](#input\_remote\_state\_infra\_root\_dns\_zones\_key\_stack) | Override stackname path to infra\_root\_dns\_zones remote state | `string` | `""` | no | -| [remote\_state\_infra\_security\_groups\_key\_stack](#input\_remote\_state\_infra\_security\_groups\_key\_stack) | Override infra\_security\_groups stackname path to infra\_vpc remote state | `string` | `""` | no | -| [remote\_state\_infra\_stack\_dns\_zones\_key\_stack](#input\_remote\_state\_infra\_stack\_dns\_zones\_key\_stack) | Override stackname path to infra\_stack\_dns\_zones remote state | `string` | `""` | no | -| [remote\_state\_infra\_vpc\_key\_stack](#input\_remote\_state\_infra\_vpc\_key\_stack) | Override infra\_vpc remote state path | `string` | `""` | no | -| [stackname](#input\_stackname) | Stackname | `string` | n/a | yes | - -## Outputs - -No outputs. diff --git a/terraform/projects/fastly-datagovuk/datagovuk.vcl b/terraform/projects/fastly-datagovuk/datagovuk.vcl deleted file mode 100644 index bb43611d5..000000000 --- a/terraform/projects/fastly-datagovuk/datagovuk.vcl +++ /dev/null @@ -1,123 +0,0 @@ -acl purge_ip_whitelist { - "18.202.183.143"; # AWS NAT GW1 Staging - "18.203.90.80"; # AWS NAT GW2 Staging - "18.203.108.248"; # AWS NAT GW3 Staging - "34.246.209.74"; # AWS NAT GW1 Production - "34.253.57.8"; # AWS NAT GW2 Production - "18.202.136.43"; # AWS NAT GW3 Production - "54.246.115.159"; # EKS Staging NAT gateways - "54.220.171.242"; - "54.228.115.164"; - "63.33.241.191"; # EKS Production NAT gateways - "52.208.193.230"; - "54.220.6.200"; -} - -sub vcl_recv { -#FASTLY recv - - # Allow FASTLYPURGE from IPs defined in the ACL only, else return a HTTP 403 - if (req.request == "FASTLYPURGE" && !(client.ip ~ purge_ip_whitelist)) { - error 403 "Forbidden"; - } - - # Redirect to security.txt for "/.well-known/security.txt" or "/security.txt" - if (req.url.path ~ "(?i)^(?:/\.well[-_]known)?/security\.txt$") { - error 805 "security.txt"; - } - - # Remove any Google Analytics campaign params - set req.url = querystring.globfilter(req.url, "utm_*"); - - # Sort query params (improve cache hit rate) - set req.url = querystring.sort(req.url); - - if (req.url.path == "/") { - # get rid of all query parameters - set req.url = querystring.remove(req.url); - } - - if (req.method != "HEAD" && req.method != "GET" && req.method != "FASTLYPURGE") { - return(pass); - } - - return(lookup); -} - -sub vcl_fetch { -#FASTLY fetch - - if ((beresp.status == 500 || beresp.status == 503) && req.restarts < 1 && (req.method == "GET" || req.method == "HEAD")) { - restart; - } - - if (req.restarts > 0) { - set beresp.http.Fastly-Restarts = req.restarts; - } - - if (beresp.http.Set-Cookie) { - set req.http.Fastly-Cachetype = "SETCOOKIE"; - return(pass); - } - - if (beresp.http.Cache-Control ~ "private") { - set req.http.Fastly-Cachetype = "PRIVATE"; - return(pass); - } - - if (beresp.status == 500 || beresp.status == 503) { - set req.http.Fastly-Cachetype = "ERROR"; - set beresp.ttl = 1s; - set beresp.grace = 5s; - return(deliver); - } - - if (beresp.http.Expires || beresp.http.Surrogate-Control ~ "max-age" || beresp.http.Cache-Control ~ "(s-maxage|max-age)") { - # keep the ttl here - } else { - # apply the default ttl - set beresp.ttl = 3600s; - } - - return(deliver); -} - -sub vcl_hit { -#FASTLY hit - - if (!obj.cacheable) { - return(pass); - } - return(deliver); -} - -sub vcl_miss { -#FASTLY miss - return(fetch); -} - -sub vcl_deliver { -#FASTLY deliver - return(deliver); -} - -sub vcl_error { -#FASTLY error - - # 302 redirect to vdp.cabinetoffice.gov.uk called from vcl_recv. - if (obj.status == 805) { - set obj.status = 302; - set obj.http.Location = "https://vdp.cabinetoffice.gov.uk/.well-known/security.txt"; - set obj.response = "Moved"; - synthetic {""}; - return (deliver); - } -} - -sub vcl_pass { -#FASTLY pass -} - -sub vcl_log { -#FASTLY log -} diff --git a/terraform/projects/fastly-datagovuk/datagovuk.vcl.tmp b/terraform/projects/fastly-datagovuk/datagovuk.vcl.tmp deleted file mode 100644 index 4023e0f43..000000000 --- a/terraform/projects/fastly-datagovuk/datagovuk.vcl.tmp +++ /dev/null @@ -1,97 +0,0 @@ -acl purge_ip_whitelist { - "37.26.93.252"; # Skyscape mirrors - "31.210.241.100"; # Carrenza mirrors - "31.210.245.70"; # Carrenza Staging - "18.202.183.143"; # AWS NAT GW1 Staging - "18.203.90.80"; # AWS NAT GW2 Staging - "18.203.108.248"; # AWS NAT GW3 Staging - "31.210.245.86"; # Carrenza Production - "34.246.209.74"; # AWS NAT GW1 Production - "34.253.57.8"; # AWS NAT GW2 Production - "18.202.136.43"; # AWS NAT GW3 Production - <%= fastly_cache_node_subnets %> -} - -sub vcl_recv { -#FASTLY recv - - # Allow FASTLYPURGE from IPs defined in the ACL only, else return a HTTP 403 - if (req.request == "FASTLYPURGE" && !(client.ip ~ purge_ip_whitelist)) { - error 403 "Forbidden"; - } - - if (req.method != "HEAD" && req.method != "GET" && req.method != "FASTLYPURGE") { - return(pass); - } - - return(lookup); -} - -sub vcl_fetch { -#FASTLY fetch - - if ((beresp.status == 500 || beresp.status == 503) && req.restarts < 1 && (req.method == "GET" || req.method == "HEAD")) { - restart; - } - - if (req.restarts > 0) { - set beresp.http.Fastly-Restarts = req.restarts; - } - - if (beresp.http.Set-Cookie) { - set req.http.Fastly-Cachetype = "SETCOOKIE"; - return(pass); - } - - if (beresp.http.Cache-Control ~ "private") { - set req.http.Fastly-Cachetype = "PRIVATE"; - return(pass); - } - - if (beresp.status == 500 || beresp.status == 503) { - set req.http.Fastly-Cachetype = "ERROR"; - set beresp.ttl = 1s; - set beresp.grace = 5s; - return(deliver); - } - - if (beresp.http.Expires || beresp.http.Surrogate-Control ~ "max-age" || beresp.http.Cache-Control ~ "(s-maxage|max-age)") { - # keep the ttl here - } else { - # apply the default ttl - set beresp.ttl = 3600s; - } - - return(deliver); -} - -sub vcl_hit { -#FASTLY hit - - if (!obj.cacheable) { - return(pass); - } - return(deliver); -} - -sub vcl_miss { -#FASTLY miss - return(fetch); -} - -sub vcl_deliver { -#FASTLY deliver - return(deliver); -} - -sub vcl_error { -#FASTLY error -} - -sub vcl_pass { -#FASTLY pass -} - -sub vcl_log { -#FASTLY log -} diff --git a/terraform/projects/fastly-datagovuk/datagovuk.vcle b/terraform/projects/fastly-datagovuk/datagovuk.vcle deleted file mode 100644 index 4023e0f43..000000000 --- a/terraform/projects/fastly-datagovuk/datagovuk.vcle +++ /dev/null @@ -1,97 +0,0 @@ -acl purge_ip_whitelist { - "37.26.93.252"; # Skyscape mirrors - "31.210.241.100"; # Carrenza mirrors - "31.210.245.70"; # Carrenza Staging - "18.202.183.143"; # AWS NAT GW1 Staging - "18.203.90.80"; # AWS NAT GW2 Staging - "18.203.108.248"; # AWS NAT GW3 Staging - "31.210.245.86"; # Carrenza Production - "34.246.209.74"; # AWS NAT GW1 Production - "34.253.57.8"; # AWS NAT GW2 Production - "18.202.136.43"; # AWS NAT GW3 Production - <%= fastly_cache_node_subnets %> -} - -sub vcl_recv { -#FASTLY recv - - # Allow FASTLYPURGE from IPs defined in the ACL only, else return a HTTP 403 - if (req.request == "FASTLYPURGE" && !(client.ip ~ purge_ip_whitelist)) { - error 403 "Forbidden"; - } - - if (req.method != "HEAD" && req.method != "GET" && req.method != "FASTLYPURGE") { - return(pass); - } - - return(lookup); -} - -sub vcl_fetch { -#FASTLY fetch - - if ((beresp.status == 500 || beresp.status == 503) && req.restarts < 1 && (req.method == "GET" || req.method == "HEAD")) { - restart; - } - - if (req.restarts > 0) { - set beresp.http.Fastly-Restarts = req.restarts; - } - - if (beresp.http.Set-Cookie) { - set req.http.Fastly-Cachetype = "SETCOOKIE"; - return(pass); - } - - if (beresp.http.Cache-Control ~ "private") { - set req.http.Fastly-Cachetype = "PRIVATE"; - return(pass); - } - - if (beresp.status == 500 || beresp.status == 503) { - set req.http.Fastly-Cachetype = "ERROR"; - set beresp.ttl = 1s; - set beresp.grace = 5s; - return(deliver); - } - - if (beresp.http.Expires || beresp.http.Surrogate-Control ~ "max-age" || beresp.http.Cache-Control ~ "(s-maxage|max-age)") { - # keep the ttl here - } else { - # apply the default ttl - set beresp.ttl = 3600s; - } - - return(deliver); -} - -sub vcl_hit { -#FASTLY hit - - if (!obj.cacheable) { - return(pass); - } - return(deliver); -} - -sub vcl_miss { -#FASTLY miss - return(fetch); -} - -sub vcl_deliver { -#FASTLY deliver - return(deliver); -} - -sub vcl_error { -#FASTLY error -} - -sub vcl_pass { -#FASTLY pass -} - -sub vcl_log { -#FASTLY log -} diff --git a/terraform/projects/fastly-datagovuk/fastly.sh b/terraform/projects/fastly-datagovuk/fastly.sh deleted file mode 100644 index 660dcd0ff..000000000 --- a/terraform/projects/fastly-datagovuk/fastly.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# TODO: FIXME -# shellcheck disable=SC2207 -fastly_raw_ips=( $(curl https://api.fastly.com/public-ip-list 2>/dev/null | jq -r ".addresses[]") ) - -fastly_ips_snippet="" - -for cidrip in "${fastly_raw_ips[@]}" -do - ipstr=$(echo "${cidrip}" | awk -F "/" '{ print("\\\""$1"\\\"""/"$2) }') - fastly_ips_snippet="${fastly_ips_snippet}"$(printf "%-22s %s" "${ipstr}\;" "\# Fastly cache node\n ") -done - -cp "${DIR}/datagovuk.vcl.tmp" "${DIR}/datagovuk.vcl" - -sed -ie "s@<%= fastly_cache_node_subnets %>@${fastly_ips_snippet}@g" "${DIR}/datagovuk.vcl" - -echo '{"fastly":"datagovuk.vcl"}' diff --git a/terraform/projects/fastly-datagovuk/integration.govuk.backend b/terraform/projects/fastly-datagovuk/integration.govuk.backend deleted file mode 100644 index c81f5306f..000000000 --- a/terraform/projects/fastly-datagovuk/integration.govuk.backend +++ /dev/null @@ -1,4 +0,0 @@ -bucket = "govuk-terraform-steppingstone-integration" -key = "govuk/fastly-datagovuk.tfstate" -encrypt = true -region = "eu-west-1" diff --git a/terraform/projects/fastly-datagovuk/main.tf b/terraform/projects/fastly-datagovuk/main.tf deleted file mode 100644 index eb13f7237..000000000 --- a/terraform/projects/fastly-datagovuk/main.tf +++ /dev/null @@ -1,135 +0,0 @@ -/** -* ## Project: fastly-datagovuk -* -* Manages the Fastly service for data.gov.uk -*/ - -# Resources -# -------------------------------------------------------------- -terraform { - backend "s3" {} - required_version = "~> 0.12.31" -} - -provider "fastly" { - api_key = var.fastly_api_key - version = "~> 0.26.0" -} - -data "external" "fastly" { - program = ["/bin/bash", "${path.module}/fastly.sh"] -} - -resource "fastly_service_v1" "datagovuk" { - name = "${title(var.aws_environment)} data.gov.uk" - - domain { - name = var.domain - } - - domain { - name = "www.${var.domain}" - } - - backend { - name = "cname ${var.backend_domain}" - address = var.backend_domain - port = "443" - use_ssl = true - auto_loadbalance = false - first_byte_timeout = 120000 - ssl_check_cert = false - } - - backend { - name = "cname dfe-app1.codeenigma.net" - address = "dfe-app1.codeenigma.net" - port = "443" - use_ssl = true - auto_loadbalance = false - first_byte_timeout = 120000 - ssl_check_cert = false - request_condition = "education_standards" - } - - vcl { - name = "datagovuk_vcl" - content = file(data.external.fastly.result.fastly) - main = true - } - - condition { - name = "education_standards" - type = "REQUEST" - statement = "req.url ~ \"^/education-standards\"" - } - - header { - name = "education_standards_url" - action = "set" - type = "request" - destination = "url" - source = "regsub(req.url, \"^/education-standards\", \"\")" - request_condition = "education_standards" - } - - header { - name = "education_standards_host" - action = "set" - type = "request" - destination = "http.host" - source = "\"dfe-app1.codeenigma.net\"" - request_condition = "education_standards" - } - - request_setting { - name = "Force TLS" - force_ssl = true - } - - s3logging { - # Apache log format documentation: https://www.loggly.com/ultimate-guide/apache-logging-basics/ - format = "%h\\t%%{%Y-%m-%d %H:%M:%S}t.%%{msec_frac}t\\t%m\\t%U%q\\t%>s\\t%B\\t%%{tls.client.protocol}V\\t%%{fastly_info.state}V\\t%%{Referer}i\\t%%{User-Agent}i" - bucket_name = "govuk-${var.aws_environment}-fastly-logs" - domain = "s3-eu-west-1.amazonaws.com" - format_version = "2" - gzip_level = "9" - message_type = "blank" - name = "s3-dgu-logging" - path = "datagovuk/" - period = "600" - redundancy = "standard" - response_condition = "" - s3_access_key = var.logging_aws_access_key_id - s3_secret_key = var.logging_aws_secret_access_key - timestamp_format = "" - } - - # The next four blocks handle the data.gov.uk -> www.data.gov.uk redirect - condition { - name = "${var.domain} to www.${var.domain} redirect request condition" - statement = "req.http.host == \"${var.domain}\"" - type = "REQUEST" - } - - response_object { - name = "${var.domain} to www.${var.domain} redirect synthetic response" - status = 301 - request_condition = "${var.domain} to www.${var.domain} redirect request condition" - } - - condition { - name = "${var.domain} to www.${var.domain} redirect response condition" - statement = "req.http.host == \"${var.domain}\" && resp.status == 301" - type = "RESPONSE" - } - - header { - name = "${var.domain} to www.${var.domain} redirect location header" - action = "set" - type = "response" - destination = "http.Location" - source = "\"https://www.${var.domain}\" + req.url" - response_condition = "${var.domain} to www.${var.domain} redirect response condition" - } -} diff --git a/terraform/projects/fastly-datagovuk/production.govuk.backend b/terraform/projects/fastly-datagovuk/production.govuk.backend deleted file mode 100644 index 09341c252..000000000 --- a/terraform/projects/fastly-datagovuk/production.govuk.backend +++ /dev/null @@ -1,4 +0,0 @@ -bucket = "govuk-terraform-steppingstone-production" -key = "govuk/fastly-datagovuk.tfstate" -encrypt = true -region = "eu-west-1" diff --git a/terraform/projects/fastly-datagovuk/remote_state.tf b/terraform/projects/fastly-datagovuk/remote_state.tf deleted file mode 100644 index 9663ef63f..000000000 --- a/terraform/projects/fastly-datagovuk/remote_state.tf +++ /dev/null @@ -1,111 +0,0 @@ -/** -* ## Manifest: remote_state -* -* This file is generated by generate-remote-state-boiler-plate.sh. DO NOT EDIT -* -* Create infrastructure data resources -*/ - -variable "remote_state_bucket" { - type = string - description = "S3 bucket we store our terraform state in" -} - -variable "remote_state_infra_vpc_key_stack" { - type = string - description = "Override infra_vpc remote state path" - default = "" -} - -variable "remote_state_infra_networking_key_stack" { - type = string - description = "Override infra_networking remote state path" - default = "" -} - -variable "remote_state_infra_security_groups_key_stack" { - type = string - description = "Override infra_security_groups stackname path to infra_vpc remote state " - default = "" -} - -variable "remote_state_infra_root_dns_zones_key_stack" { - type = string - description = "Override stackname path to infra_root_dns_zones remote state " - default = "" -} - -variable "remote_state_infra_stack_dns_zones_key_stack" { - type = string - description = "Override stackname path to infra_stack_dns_zones remote state " - default = "" -} - -variable "remote_state_infra_monitoring_key_stack" { - type = string - description = "Override stackname path to infra_monitoring remote state " - default = "" -} - -# Resources -# -------------------------------------------------------------- - -data "terraform_remote_state" "infra_vpc" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_vpc_key_stack, var.stackname)}/infra-vpc.tfstate" - region = "${var.aws_region}" - } -} - -data "terraform_remote_state" "infra_networking" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_networking_key_stack, var.stackname)}/infra-networking.tfstate" - region = "${var.aws_region}" - } -} - -data "terraform_remote_state" "infra_security_groups" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_security_groups_key_stack, var.stackname)}/infra-security-groups.tfstate" - region = "${var.aws_region}" - } -} - -data "terraform_remote_state" "infra_root_dns_zones" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_root_dns_zones_key_stack, var.stackname)}/infra-root-dns-zones.tfstate" - region = "${var.aws_region}" - } -} - -data "terraform_remote_state" "infra_stack_dns_zones" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_stack_dns_zones_key_stack, var.stackname)}/infra-stack-dns-zones.tfstate" - region = "${var.aws_region}" - } -} - -data "terraform_remote_state" "infra_monitoring" { - backend = "s3" - - config = { - bucket = "${var.remote_state_bucket}" - key = "${coalesce(var.remote_state_infra_monitoring_key_stack, var.stackname)}/infra-monitoring.tfstate" - region = "${var.aws_region}" - } -} diff --git a/terraform/projects/fastly-datagovuk/staging.govuk.backend b/terraform/projects/fastly-datagovuk/staging.govuk.backend deleted file mode 100644 index cfbcbfb58..000000000 --- a/terraform/projects/fastly-datagovuk/staging.govuk.backend +++ /dev/null @@ -1,4 +0,0 @@ -bucket = "govuk-terraform-steppingstone-staging" -key = "govuk/fastly-datagovuk.tfstate" -encrypt = true -region = "eu-west-1" diff --git a/terraform/projects/fastly-datagovuk/variables.tf b/terraform/projects/fastly-datagovuk/variables.tf deleted file mode 100644 index dd4d3ae9d..000000000 --- a/terraform/projects/fastly-datagovuk/variables.tf +++ /dev/null @@ -1,40 +0,0 @@ -variable "aws_region" { - type = string - description = "AWS region" - default = "eu-west-1" -} - -variable "stackname" { - type = string - description = "Stackname" -} - -variable "aws_environment" { - type = string - description = "AWS Environment" -} - -variable "fastly_api_key" { - type = string - description = "API key to authenticate with Fastly" -} - -variable "logging_aws_access_key_id" { - type = string - description = "IAM key ID with access to put logs into the S3 bucket" -} - -variable "logging_aws_secret_access_key" { - type = string - description = "IAM secret key with access to put logs into the S3 bucket" -} - -variable "domain" { - type = string - description = "The domain of the data.gov.uk service to manage" -} - -variable "backend_domain" { - type = string - description = "The domain of the data.gov.uk PaaS instance to forward requests to" -}