Skip to content

Commit

Permalink
Fix sg issue when not deploying to vpc. (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pkommini authored May 17, 2022
1 parent ffce945 commit 0513b58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security.tf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resource "aws_security_group" "geff_lambda_sg" {
count = length(var.lambda_security_group_ids) == 0 ? 1 : 0
count = var.deploy_lambda_in_vpc && length(var.lambda_security_group_ids) == 0 ? 1 : 0

name = "${local.geff_prefix}-lambda-sg"
description = "Create security group for lambda if not provided."
vpc_id = var.vpc_id
}

resource "aws_security_group_rule" "geff_lambda_sg_egress_rule" {
count = length(var.lambda_security_group_ids) == 0 ? 1 : 0
count = var.deploy_lambda_in_vpc && length(var.lambda_security_group_ids) == 0 ? 1 : 0

type = "egress"
to_port = 0
Expand Down

0 comments on commit 0513b58

Please sign in to comment.