From d1ff2f5759a9680288704bac639736fd44ec4a66 Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Thu, 14 Dec 2023 15:39:20 +0000 Subject: [PATCH] Use current TF+provider versions in WAF module. Also remove a reference to another deleted load balancer, which was breaking the ability to apply the module in prod. --- terraform/projects/infra-public-wafs/.terraform-version | 2 +- terraform/projects/infra-public-wafs/README.md | 7 +++---- terraform/projects/infra-public-wafs/main.tf | 5 ++--- terraform/projects/infra-public-wafs/standard_config.tf | 5 ----- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/terraform/projects/infra-public-wafs/.terraform-version b/terraform/projects/infra-public-wafs/.terraform-version index 2bf1ca5f5..ec70f7556 100644 --- a/terraform/projects/infra-public-wafs/.terraform-version +++ b/terraform/projects/infra-public-wafs/.terraform-version @@ -1 +1 @@ -1.1.7 +1.6.6 diff --git a/terraform/projects/infra-public-wafs/README.md b/terraform/projects/infra-public-wafs/README.md index f4a1c2cd6..6e80ff6ca 100644 --- a/terraform/projects/infra-public-wafs/README.md +++ b/terraform/projects/infra-public-wafs/README.md @@ -2,14 +2,14 @@ | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | = 1.1.7 | -| [aws](#requirement\_aws) | ~> 3.0 | +| [terraform](#requirement\_terraform) | ~> 1.6 | +| [aws](#requirement\_aws) | ~> 5.0 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | ~> 3.0 | +| [aws](#provider\_aws) | ~> 5.0 | | [terraform](#provider\_terraform) | n/a | ## Modules @@ -30,7 +30,6 @@ No modules. | [aws_shield_protection.licensify_backend_public_lb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/shield_protection) | resource | | [aws_shield_protection.licensify_frontend_public_lb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/shield_protection) | resource | | [aws_shield_protection.monitoring_public_lb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/shield_protection) | resource | -| [aws_shield_protection.prometheus_public_lb](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/shield_protection) | resource | | [aws_wafv2_ip_set.govuk_requesting_ips](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource | | [aws_wafv2_ip_set.high_request_rate](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource | | [aws_wafv2_ip_set.nat_gateway_ips](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource | diff --git a/terraform/projects/infra-public-wafs/main.tf b/terraform/projects/infra-public-wafs/main.tf index 424c48a5b..685bb2bfc 100644 --- a/terraform/projects/infra-public-wafs/main.tf +++ b/terraform/projects/infra-public-wafs/main.tf @@ -1,11 +1,10 @@ terraform { backend "s3" {} - required_version = "= 1.1.7" - + required_version = "~> 1.6" required_providers { aws = { source = "hashicorp/aws" - version = "~> 3.0" + version = "~> 5.0" } } } diff --git a/terraform/projects/infra-public-wafs/standard_config.tf b/terraform/projects/infra-public-wafs/standard_config.tf index 632c7983f..09cc15354 100644 --- a/terraform/projects/infra-public-wafs/standard_config.tf +++ b/terraform/projects/infra-public-wafs/standard_config.tf @@ -49,8 +49,3 @@ resource "aws_wafv2_web_acl_association" "monitoring_public_web_acl" { resource_arn = data.terraform_remote_state.infra_public_services.outputs.monitoring_public_lb_id web_acl_arn = aws_wafv2_web_acl.default.arn } - -resource "aws_shield_protection" "prometheus_public_lb" { - name = "${var.stackname}-prometheus-public-lb_shield" - resource_arn = data.terraform_remote_state.infra_public_services.outputs.prometheus_public_lb_id -}