From 2c2b43014b517ae1950adcae2a77cdf2049af3e3 Mon Sep 17 00:00:00 2001 From: okalin Date: Tue, 26 Dec 2023 16:37:10 +0100 Subject: [PATCH] Update arm checker --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 9bb8c99..482cb21 100644 --- a/main.tf +++ b/main.tf @@ -1,5 +1,5 @@ locals { - is_arm = regex("[a-zA-Z]+\\d+g[a-z]*\\..+", var.instance_type) == var.instance_type + is_arm = can(regex("[a-zA-Z]+\\d+g[a-z]*\\..+", var.instance_type)) ami_id = var.ami_id != null ? var.ami_id : data.aws_ami.main[0].id cwagent_param_arn = var.use_cloudwatch_agent ? var.cloudwatch_agent_configuration_param_arn != null ? var.cloudwatch_agent_configuration_param_arn : aws_ssm_parameter.cloudwatch_agent_config[0].arn : null cwagent_param_name = var.use_cloudwatch_agent ? var.cloudwatch_agent_configuration_param_arn != null ? split("/", data.aws_arn.ssm_param[0].resource)[1] : aws_ssm_parameter.cloudwatch_agent_config[0].name : null