Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove opinionated tag #381

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading