From 9fdde33158c666571db6e99ccb5b20c3be0970a3 Mon Sep 17 00:00:00 2001 From: Marcio Goda Date: Thu, 15 Aug 2024 11:17:15 +0100 Subject: [PATCH] renamed use_default_security_group variabel --- main.tf | 4 ++-- variables.tf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index 8ebf7ee..ec0dc85 100644 --- a/main.tf +++ b/main.tf @@ -1,9 +1,9 @@ locals { - security_group_ids = var.security_group_ids != null ? var.security_group_ids : [aws_security_group.default[0].id] + security_group_ids = var.use_default_security_group == false ? var.security_group_ids : [data.aws_security_group.default[0].id] } data "aws_security_group" "default" { - count = var.use_default_sg == true ? 1 : 0 + count = var.use_default_security_group == true ? 1 : 0 name = "${terraform.workspace}-default-lambda-sg" } diff --git a/variables.tf b/variables.tf index 620a78e..6e29356 100644 --- a/variables.tf +++ b/variables.tf @@ -138,7 +138,7 @@ variable "architectures" { default = ["x86_64"] } -variable "use_default_sg" { +variable "use_default_security_group" { type = bool description = "Use default security group" default = false