From 96d87c55321d00c4eba6b89b10aa602f7f3b63aa Mon Sep 17 00:00:00 2001 From: Keir Badger Date: Wed, 4 Sep 2024 10:20:37 +0000 Subject: [PATCH 1/2] try count --- fastly.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/fastly.tf b/fastly.tf index d91a969..2d7bf8e 100644 --- a/fastly.tf +++ b/fastly.tf @@ -1,5 +1,6 @@ module "fastly" { source = "./modules/fastly-frontend" + count = 1 domain_name = var.fastly_domain additional_domain_names = var.additional_fastly_domains From e96734d7aaeb09a6a1abf448a8d88e00f4e5210f Mon Sep 17 00:00:00 2001 From: Keir Badger Date: Wed, 4 Sep 2024 10:38:13 +0000 Subject: [PATCH 2/2] add cloudfront_migrated var --- fastly.tf | 2 +- variables.tf | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fastly.tf b/fastly.tf index 2d7bf8e..ea38b16 100644 --- a/fastly.tf +++ b/fastly.tf @@ -1,6 +1,6 @@ module "fastly" { source = "./modules/fastly-frontend" - count = 1 + count = var.cloudfront_migrated == "false" ? 1 : 0 domain_name = var.fastly_domain additional_domain_names = var.additional_fastly_domains diff --git a/variables.tf b/variables.tf index 6d47370..064b4d2 100644 --- a/variables.tf +++ b/variables.tf @@ -1,3 +1,10 @@ +variable "cloudfront_migrated" { + description = "Whether the service has been migrated to CloudFront" + type = string + default = "false" + +} + # required variable "fastly_domain" { description = ""