From b9279e3a03a02fc1d38ede391e96b786dcdb3ceb Mon Sep 17 00:00:00 2001 From: Matthieu Lienart Date: Mon, 24 Jul 2023 18:17:52 +0200 Subject: [PATCH] Add condition to create a aws_appconfig_deployment only if a version is passed --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 38426a1..a2cb7c4 100644 --- a/main.tf +++ b/main.tf @@ -91,7 +91,7 @@ resource "aws_appconfig_deployment_strategy" "this" { } resource "aws_appconfig_deployment" "this" { - for_each = var.create ? var.environments : {} + for_each = var.create && (var.deployment_configuration_version != null) ? var.environments : {} description = coalesce(var.deployment_description, var.description) application_id = aws_appconfig_application.this[0].id