From e77930bacb666192e9b44544f9b77ee401fc96d8 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Thu, 9 Jul 2026 10:02:05 +0100 Subject: [PATCH 01/16] CCM-21851: Add missing pack specification to dev config --- .../notify-admail-colour-whitemail.json | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 config/suppliers/pack-specification/notify-admail-colour-whitemail.json diff --git a/config/suppliers/pack-specification/notify-admail-colour-whitemail.json b/config/suppliers/pack-specification/notify-admail-colour-whitemail.json new file mode 100644 index 000000000..dd735faec --- /dev/null +++ b/config/suppliers/pack-specification/notify-admail-colour-whitemail.json @@ -0,0 +1,55 @@ +{ + "assembly": { + "duplex": true, + "envelopeId": "economy-c5", + "features": [ + "ADMAIL" + ], + "paper": { + "colour": "WHITE", + "id": "paper-std-white-80", + "name": "Standard White 80gsm", + "recycled": true, + "size": "A4", + "weightGSM": 80 + }, + "printColour": "COLOUR" + }, + "billingId": "insert-admail-colour", + "constraints": { + "blackCoveragePercentage": { + "operator": "LESS_THAN", + "value": 20 + }, + "colourCoveragePercentage": { + "operator": "LESS_THAN", + "value": 10 + }, + "deliveryDays": { + "operator": "LESS_THAN", + "value": 2 + }, + "sheets": { + "operator": "LESS_THAN", + "value": 5 + }, + "sides": { + "operator": "LESS_THAN", + "value": 10 + } + }, + "createdAt": "2026-01-12T00:00:00.000Z", + "description": "Admail economy tariff with whitemail envelope and colour printing", + "id": "notify-admail-colour-whitemail", + "name": "Admail (colour whitemail)", + "postage": { + "deliveryDays": 4, + "id": "admail-economy", + "maxThicknessMm": 5, + "maxWeightGrams": 100, + "size": "STANDARD" + }, + "status": "PROD", + "updatedAt": "2026-01-12T00:00:00.000Z", + "version": 1 +} From 36b3b33a34b0fbc7ec1729d2aee0e57b25346b41 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Thu, 9 Jul 2026 10:31:01 +0100 Subject: [PATCH 02/16] Add supplier pack too --- .../supplier1-notify-admail-colour-whitemail.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/suppliers/supplier-pack/supplier1-notify-admail-colour-whitemail.json diff --git a/config/suppliers/supplier-pack/supplier1-notify-admail-colour-whitemail.json b/config/suppliers/supplier-pack/supplier1-notify-admail-colour-whitemail.json new file mode 100644 index 000000000..859848c3a --- /dev/null +++ b/config/suppliers/supplier-pack/supplier1-notify-admail-colour-whitemail.json @@ -0,0 +1,7 @@ +{ + "approval": "APPROVED", + "id": "supplier1-notify-admail-colour-whitemail", + "packSpecificationId": "notify-admail-colour-whitemail", + "status": "PROD", + "supplierId": "supplier1" +} From b673cb4962db04c26a18f66a5fa807b233f488b7 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Fri, 10 Jul 2026 15:03:04 +0100 Subject: [PATCH 03/16] Revert "CCM-14114: set TLS version on Rest API to be 1.2, to match domain name (#491)" This reverts commit 9b1e49c44fb3b0a0bb8c477f889622a38099c319. --- .../terraform/components/api/api_gateway_rest_api.tf | 4 ---- .../components/api/api_gateway_rest_api_tls.tf | 11 ----------- infrastructure/terraform/components/api/locals.tf | 2 -- .../terraform/components/api/resources/spec.tmpl.json | 4 +--- 4 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 infrastructure/terraform/components/api/api_gateway_rest_api_tls.tf diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 1b259235e..aadbc0be8 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -3,8 +3,4 @@ resource "aws_api_gateway_rest_api" "main" { body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - - lifecycle { - replace_triggered_by = [terraform_data.rest_api_security_policy] - } } diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api_tls.tf b/infrastructure/terraform/components/api/api_gateway_rest_api_tls.tf deleted file mode 100644 index efef825f1..000000000 --- a/infrastructure/terraform/components/api/api_gateway_rest_api_tls.tf +++ /dev/null @@ -1,11 +0,0 @@ -locals { - rest_api_security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" - rest_api_endpoint_access_mode = "STRICT" -} - -resource "terraform_data" "rest_api_security_policy" { - input = { - security_policy = local.rest_api_security_policy - endpoint_access_mode = local.rest_api_endpoint_access_mode - } -} diff --git a/infrastructure/terraform/components/api/locals.tf b/infrastructure/terraform/components/api/locals.tf index 517590fa8..da1e61630 100644 --- a/infrastructure/terraform/components/api/locals.tf +++ b/infrastructure/terraform/components/api/locals.tf @@ -7,8 +7,6 @@ locals { openapi_spec = templatefile("${path.module}/resources/spec.tmpl.json", { APIG_EXECUTION_ROLE_ARN = aws_iam_role.api_gateway_execution_role.arn AWS_REGION = var.region - SECURITY_POLICY = local.rest_api_security_policy - ENDPOINT_ACCESS_MODE = local.rest_api_endpoint_access_mode AUTHORIZER_LAMBDA_ARN = module.authorizer_lambda.function_arn GET_LETTER_LAMBDA_ARN = module.get_letter.function_arn GET_LETTERS_LAMBDA_ARN = module.get_letters.function_arn diff --git a/infrastructure/terraform/components/api/resources/spec.tmpl.json b/infrastructure/terraform/components/api/resources/spec.tmpl.json index 8d6430127..51ad83dfb 100644 --- a/infrastructure/terraform/components/api/resources/spec.tmpl.json +++ b/infrastructure/terraform/components/api/resources/spec.tmpl.json @@ -357,7 +357,5 @@ } ] } - }, - "x-amazon-apigateway-endpoint-access-mode": "${ENDPOINT_ACCESS_MODE}", - "x-amazon-apigateway-security-policy": "${SECURITY_POLICY}" + } } From e2475837338732c78502d202df56c4beeda329ad Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Fri, 10 Jul 2026 15:09:40 +0100 Subject: [PATCH 04/16] Add security_policy and endpoint_access_node to aws_api_gateway_rest_api --- .../terraform/components/api/api_gateway_rest_api.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index aadbc0be8..32cfb38ca 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,6 +1,13 @@ +locals { + rest_api_security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" + rest_api_endpoint_access_mode = "STRICT" +} + resource "aws_api_gateway_rest_api" "main" { name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint + security_policy = local.rest_api_security_policy + endpoint_access_mode = local.rest_api_endpoint_access_mode } From 0e0028f3d783af7b77c31473400b187440636739 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 13:23:47 +0100 Subject: [PATCH 05/16] Remove locals --- .../terraform/components/api/api_gateway_rest_api.tf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 32cfb38ca..0e10d6a3a 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,13 +1,8 @@ -locals { - rest_api_security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" - rest_api_endpoint_access_mode = "STRICT" -} - resource "aws_api_gateway_rest_api" "main" { name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - security_policy = local.rest_api_security_policy - endpoint_access_mode = local.rest_api_endpoint_access_mode + security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" + endpoint_access_mode = "STRICT" } From f6bfdfae06a0cb548e6c6bbbfa6bff80a2bef673 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 13:36:15 +0100 Subject: [PATCH 06/16] Try again --- .../terraform/components/api/api_gateway_rest_api.tf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 0e10d6a3a..8f0489a8b 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -3,6 +3,5 @@ resource "aws_api_gateway_rest_api" "main" { body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" - endpoint_access_mode = "STRICT" + security_policy = "TLS_1_2" } From 4f28f6e2df311a80b34bafe611802bbc81f86c35 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 14:16:00 +0100 Subject: [PATCH 07/16] Force recreation --- .../terraform/components/api/api_gateway_rest_api.tf | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 8f0489a8b..9f496e07f 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,7 +1,16 @@ +locals { + rest_api_security_policy = "TLS_1_2" +} + +resource "terraform_data" "rest_api_security_policy" { + input = { + security_policy = local.rest_api_security_policy + } +} resource "aws_api_gateway_rest_api" "main" { name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - security_policy = "TLS_1_2" + security_policy = local.rest_api_security_policy } From d568dbd2c3d9f0355b2262583dc4c7c3279d1997 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 14:47:53 +0100 Subject: [PATCH 08/16] Add missing lifecycle --- .../terraform/components/api/api_gateway_rest_api.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 9f496e07f..a99258ff5 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -13,4 +13,8 @@ resource "aws_api_gateway_rest_api" "main" { description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint security_policy = local.rest_api_security_policy + + lifecycle { + replace_triggered_by = [terraform_data.rest_api_security_policy] + } } From 59a5324e73ff638c58ddda95eeb0aabf91e0e5b3 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 15:04:50 +0100 Subject: [PATCH 09/16] Try enhanced security policy --- .../components/api/api_gateway_rest_api.tf | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index a99258ff5..cff7577c9 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,20 +1,9 @@ -locals { - rest_api_security_policy = "TLS_1_2" -} -resource "terraform_data" "rest_api_security_policy" { - input = { - security_policy = local.rest_api_security_policy - } -} resource "aws_api_gateway_rest_api" "main" { name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - security_policy = local.rest_api_security_policy - - lifecycle { - replace_triggered_by = [terraform_data.rest_api_security_policy] - } + security_policy = "SecurityPolicy_TLS13_1_2_2021_06" + endpoint_access_mode = "STRICT" } From ddb6e995deaa6a2802b3816aab989fecee8cebe2 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 15:22:22 +0100 Subject: [PATCH 10/16] Fix for deployment --- .../terraform/components/api/api_gateway_deployment.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/terraform/components/api/api_gateway_deployment.tf b/infrastructure/terraform/components/api/api_gateway_deployment.tf index 458752390..bbbaf25b5 100644 --- a/infrastructure/terraform/components/api/api_gateway_deployment.tf +++ b/infrastructure/terraform/components/api/api_gateway_deployment.tf @@ -10,6 +10,10 @@ resource "aws_api_gateway_deployment" "main" { deployed_at = timestamp() } + depends_on = [ + aws_api_gateway_rest_api.main + ] + lifecycle { create_before_destroy = true } From 7d9687475a4764f9f77315b1c586ab1c041dc4b1 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 15:41:36 +0100 Subject: [PATCH 11/16] Try BASIC --- infrastructure/terraform/components/api/api_gateway_rest_api.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index cff7577c9..b905c7865 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -5,5 +5,5 @@ resource "aws_api_gateway_rest_api" "main" { description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint security_policy = "SecurityPolicy_TLS13_1_2_2021_06" - endpoint_access_mode = "STRICT" + endpoint_access_mode = "BASIC" } From fe00794fdbcf5b6bdabe48299c7a2e3385dcf8ca Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Mon, 13 Jul 2026 16:28:43 +0100 Subject: [PATCH 12/16] Specify regional endpoint --- .../terraform/components/api/api_gateway_rest_api.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index b905c7865..8e2a9165a 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -6,4 +6,8 @@ resource "aws_api_gateway_rest_api" "main" { disable_execute_api_endpoint = var.disable_gateway_execute_endpoint security_policy = "SecurityPolicy_TLS13_1_2_2021_06" endpoint_access_mode = "BASIC" + + endpoint_configuration { + types = ["REGIONAL"] + } } From 32665b1677fd42f06fc730c09e82cb01d3e73482 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Tue, 14 Jul 2026 13:43:41 +0100 Subject: [PATCH 13/16] Force replacement of API gateway --- .../terraform/components/api/api_gateway_rest_api.tf | 10 +++++++--- infrastructure/terraform/components/api/locals.tf | 9 +++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 8e2a9165a..7d45f4139 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,13 +1,17 @@ resource "aws_api_gateway_rest_api" "main" { - name = local.csi + name = "${local.csi}-${local.api_gateway_endpoint_replacement_suffix}" body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint security_policy = "SecurityPolicy_TLS13_1_2_2021_06" - endpoint_access_mode = "BASIC" + endpoint_access_mode = local.api_gateway_endpoint_access_mode endpoint_configuration { - types = ["REGIONAL"] + types = [local.api_gateway_endpoint_type] + } + + lifecycle { + create_before_destroy = true } } diff --git a/infrastructure/terraform/components/api/locals.tf b/infrastructure/terraform/components/api/locals.tf index da1e61630..256dd8d92 100644 --- a/infrastructure/terraform/components/api/locals.tf +++ b/infrastructure/terraform/components/api/locals.tf @@ -47,4 +47,13 @@ locals { var.region, var.csoc_destination_account ) + + api_gateway_endpoint_access_mode = "BASIC" + api_gateway_endpoint_type = "REGIONAL" + # Force replacement when endpoint settings change, since AWS rejects updating + # endpoint type and endpoint access mode together in a single in-place update. + api_gateway_endpoint_replacement_suffix = substr(md5(jsonencode({ + access_mode = local.api_gateway_endpoint_access_mode + type = local.api_gateway_endpoint_type + })), 0, 8) } From a7decef9d9ff89984f0542b9c11727c41f127149 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Tue, 14 Jul 2026 14:01:10 +0100 Subject: [PATCH 14/16] Try again --- .../terraform/components/api/api_gateway_rest_api.tf | 10 +++++++++- infrastructure/terraform/components/api/locals.tf | 6 ------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 7d45f4139..1a3c5ed7a 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,6 +1,13 @@ +resource "terraform_data" "api_gateway_endpoint_settings" { + input = { + endpoint_access_mode = local.api_gateway_endpoint_access_mode + endpoint_type = local.api_gateway_endpoint_type + } +} + resource "aws_api_gateway_rest_api" "main" { - name = "${local.csi}-${local.api_gateway_endpoint_replacement_suffix}" + name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint @@ -13,5 +20,6 @@ resource "aws_api_gateway_rest_api" "main" { lifecycle { create_before_destroy = true + replace_triggered_by = [terraform_data.api_gateway_endpoint_settings] } } diff --git a/infrastructure/terraform/components/api/locals.tf b/infrastructure/terraform/components/api/locals.tf index 256dd8d92..ad5c633cc 100644 --- a/infrastructure/terraform/components/api/locals.tf +++ b/infrastructure/terraform/components/api/locals.tf @@ -50,10 +50,4 @@ locals { api_gateway_endpoint_access_mode = "BASIC" api_gateway_endpoint_type = "REGIONAL" - # Force replacement when endpoint settings change, since AWS rejects updating - # endpoint type and endpoint access mode together in a single in-place update. - api_gateway_endpoint_replacement_suffix = substr(md5(jsonencode({ - access_mode = local.api_gateway_endpoint_access_mode - type = local.api_gateway_endpoint_type - })), 0, 8) } From 3a67432ccfc435e3fb4dbe063f9450daed0ef9d5 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Tue, 14 Jul 2026 15:50:10 +0100 Subject: [PATCH 15/16] Revert to what's currently live --- .../terraform/components/api/api_gateway_rest_api.tf | 4 ++-- infrastructure/terraform/components/api/locals.tf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index 1a3c5ed7a..eea82379d 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,7 +1,7 @@ resource "terraform_data" "api_gateway_endpoint_settings" { input = { - endpoint_access_mode = local.api_gateway_endpoint_access_mode + endpoint_access_mode = "local.api_gateway_endpoint_access_mode" endpoint_type = local.api_gateway_endpoint_type } } @@ -11,7 +11,7 @@ resource "aws_api_gateway_rest_api" "main" { body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint - security_policy = "SecurityPolicy_TLS13_1_2_2021_06" + security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" endpoint_access_mode = local.api_gateway_endpoint_access_mode endpoint_configuration { diff --git a/infrastructure/terraform/components/api/locals.tf b/infrastructure/terraform/components/api/locals.tf index ad5c633cc..20770ea7a 100644 --- a/infrastructure/terraform/components/api/locals.tf +++ b/infrastructure/terraform/components/api/locals.tf @@ -48,6 +48,6 @@ locals { var.csoc_destination_account ) - api_gateway_endpoint_access_mode = "BASIC" - api_gateway_endpoint_type = "REGIONAL" + api_gateway_endpoint_access_mode = "STRICT" + api_gateway_endpoint_type = "EDGE" } From 2c4cf57d3afab1aed7abe033a621735a3905ded7 Mon Sep 17 00:00:00 2001 From: Steve Buxton Date: Tue, 14 Jul 2026 16:05:32 +0100 Subject: [PATCH 16/16] Attempted fix --- .../components/api/api_gateway_rest_api.tf | 19 +------------------ .../terraform/components/api/locals.tf | 3 --- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/infrastructure/terraform/components/api/api_gateway_rest_api.tf b/infrastructure/terraform/components/api/api_gateway_rest_api.tf index eea82379d..0e10d6a3a 100644 --- a/infrastructure/terraform/components/api/api_gateway_rest_api.tf +++ b/infrastructure/terraform/components/api/api_gateway_rest_api.tf @@ -1,25 +1,8 @@ - -resource "terraform_data" "api_gateway_endpoint_settings" { - input = { - endpoint_access_mode = "local.api_gateway_endpoint_access_mode" - endpoint_type = local.api_gateway_endpoint_type - } -} - resource "aws_api_gateway_rest_api" "main" { name = local.csi body = local.openapi_spec description = "Suppliers API" disable_execute_api_endpoint = var.disable_gateway_execute_endpoint security_policy = "SecurityPolicy_TLS12_PFS_2025_EDGE" - endpoint_access_mode = local.api_gateway_endpoint_access_mode - - endpoint_configuration { - types = [local.api_gateway_endpoint_type] - } - - lifecycle { - create_before_destroy = true - replace_triggered_by = [terraform_data.api_gateway_endpoint_settings] - } + endpoint_access_mode = "STRICT" } diff --git a/infrastructure/terraform/components/api/locals.tf b/infrastructure/terraform/components/api/locals.tf index 20770ea7a..da1e61630 100644 --- a/infrastructure/terraform/components/api/locals.tf +++ b/infrastructure/terraform/components/api/locals.tf @@ -47,7 +47,4 @@ locals { var.region, var.csoc_destination_account ) - - api_gateway_endpoint_access_mode = "STRICT" - api_gateway_endpoint_type = "EDGE" }