Skip to content

Commit

Permalink
Fix tfsec warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Martinez committed Feb 10, 2022
1 parent 4b6ede2 commit 38b62d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/aws-asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ resource "aws_security_group" "inbound" {
from_port = 443
to_port = 443
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:AWS008
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:aws-vpc-no-public-ingress-sgr
}

egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:AWS009
cidr_blocks = ["0.0.0.0/0"] #tfsec:ignore:aws-vpc-no-public-egress-sgr
}

tags = {
Expand Down Expand Up @@ -237,11 +237,17 @@ resource "aws_launch_configuration" "launch_config" {
instance_type = var.launch_cfg_instance_type
key_name = var.launch_cfg_key_pair_name
name_prefix = "cga-proxy-${random_string.prefix.result}-"

metadata_options {
http_tokens = "required"
}

security_groups = compact([
aws_security_group.inbound.id,
aws_security_group.resources.id,
local.redis_enabled ? aws_security_group.redis[0].id : ""
])

user_data = <<-EOT
#!/bin/bash
%{~if var.cloudwatch_logs_enabled~}
Expand Down

0 comments on commit 38b62d1

Please sign in to comment.