Skip to content

Commit

Permalink
Remove opinionated tag
Browse files Browse the repository at this point in the history
  • Loading branch information
robertalexa committed Aug 29, 2024
1 parent 349540d commit e197af7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ data "aws_partition" "current" {}

locals {
create = var.create && var.putin_khuylo
tags = merge(var.tags, { terraform-aws-modules = "alb" })
}

################################################################################
Expand Down Expand Up @@ -64,7 +63,7 @@ resource "aws_lb" "this" {
}

subnets = var.subnets
tags = local.tags
tags = var.tags
xff_header_processing_mode = var.xff_header_processing_mode

timeouts {
Expand Down Expand Up @@ -219,7 +218,7 @@ resource "aws_lb_listener" "this" {
port = try(each.value.port, var.default_port)
protocol = try(each.value.protocol, var.default_protocol)
ssl_policy = contains(["HTTPS", "TLS"], try(each.value.protocol, var.default_protocol)) ? try(each.value.ssl_policy, "ELBSecurityPolicy-TLS13-1-2-Res-2021-06") : try(each.value.ssl_policy, null)
tags = merge(local.tags, try(each.value.tags, {}))
tags = try(each.value.tags, {})
}

################################################################################
Expand Down Expand Up @@ -446,7 +445,7 @@ resource "aws_lb_listener_rule" "this" {
}
}

tags = merge(local.tags, try(each.value.tags, {}))
tags = try(each.value.tags, {})
}

################################################################################
Expand Down Expand Up @@ -576,7 +575,7 @@ resource "aws_lb_target_group" "this" {
target_type = try(each.value.target_type, null)
vpc_id = try(each.value.vpc_id, var.vpc_id)

tags = merge(local.tags, try(each.value.tags, {}))
tags = try(each.value.tags, {})

lifecycle {
create_before_destroy = true
Expand Down Expand Up @@ -657,7 +656,7 @@ resource "aws_security_group" "this" {
description = coalesce(var.security_group_description, "Security group for ${local.security_group_name} ${var.load_balancer_type} load balancer")
vpc_id = var.vpc_id

tags = merge(local.tags, var.security_group_tags)
tags = var.security_group_tags

lifecycle {
create_before_destroy = true
Expand All @@ -680,7 +679,7 @@ resource "aws_vpc_security_group_egress_rule" "this" {
referenced_security_group_id = lookup(each.value, "referenced_security_group_id", null)
to_port = try(each.value.to_port, null)

tags = merge(local.tags, var.security_group_tags, try(each.value.tags, {}))
tags = merge(var.security_group_tags, try(each.value.tags, {}))
}

resource "aws_vpc_security_group_ingress_rule" "this" {
Expand All @@ -699,7 +698,7 @@ resource "aws_vpc_security_group_ingress_rule" "this" {
referenced_security_group_id = lookup(each.value, "referenced_security_group_id", null)
to_port = try(each.value.to_port, null)

tags = merge(local.tags, var.security_group_tags, try(each.value.tags, {}))
tags = merge(var.security_group_tags, try(each.value.tags, {}))
}

################################################################################
Expand Down

0 comments on commit e197af7

Please sign in to comment.