Skip to content

Commit

Permalink
Merge pull request #148 from trussworks/barry-remove-tags
Browse files Browse the repository at this point in the history
chore: removing tags from module
  • Loading branch information
esacteksab committed Nov 6, 2023
2 parents 0c8a563 + 825d768 commit 49853d1
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 88 deletions.
13 changes: 0 additions & 13 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ resource "aws_security_group" "alb_sg" {

tags = merge(
var.security_group_tags,
{
Name = "alb-${var.name}-${var.environment}"
Environment = var.environment
Automation = "Terraform"
},
)
}

Expand Down Expand Up @@ -85,10 +80,6 @@ resource "aws_lb" "main" {
}
}

tags = {
Environment = var.environment
Automation = "Terraform"
}
}

resource "aws_lb_target_group" "https" {
Expand Down Expand Up @@ -119,10 +110,6 @@ resource "aws_lb_target_group" "https" {
# Ensure the ALB exists before things start referencing this target group.
depends_on = [aws_lb.main]

tags = {
Environment = var.environment
Automation = "Terraform"
}
}

resource "aws_lb_listener" "http" {
Expand Down
150 changes: 75 additions & 75 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,67 +1,64 @@
variable "name" {
description = "The service name."
type = string
}

variable "environment" {
description = "Environment tag, e.g prod."
type = string
variable "alb_certificate_arns" {
description = "The ARNs of the certificates to be attached to the ALB."
type = list(string)
default = []
}

variable "logs_s3_bucket" {
description = "S3 bucket for storing access logs. Set to empty string to disable logs."
variable "alb_default_certificate_arn" {
description = "The ARN of the default certificate to be attached to the ALB."
type = string
}

variable "logs_s3_prefix_enabled" {
description = "Toggle for ALB logs S3 prefix"
default = true
type = bool
variable "alb_idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle."
type = number
default = 60
}

variable "logs_s3_prefix" {
description = "Overrides prefix for ALB logs"
default = ""
variable "alb_internal" {
description = "If true, the ALB will be internal. Default's to false, the ALB will be public."
type = string
default = false
}

variable "alb_default_certificate_arn" {
description = "The ARN of the default certificate to be attached to the ALB."
variable "alb_ssl_policy" {
description = "The SSL policy (aka security policy) for the Application Load Balancer that specifies the TLS protocols and ciphers allowed. See <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>."
type = string
default = "ELBSecurityPolicy-2016-08"
}

variable "alb_certificate_arns" {
description = "The ARNs of the certificates to be attached to the ALB."
variable "alb_subnet_ids" {
description = "Subnet IDs for the ALB. Use public subnets for a public ALB and private subnets for an internal ALB."
type = list(string)
default = []
}

variable "alb_vpc_id" {
description = "VPC ID to be used by the ALB."
type = string
}

variable "alb_internal" {
description = "If true, the ALB will be internal. Default's to false, the ALB will be public."
variable "allow_public_http" {
description = "Allow inbound access from the Internet to port 80"
type = string
default = false
default = true
}

variable "alb_subnet_ids" {
description = "Subnet IDs for the ALB. Use public subnets for a public ALB and private subnets for an internal ALB."
type = list(string)
variable "allow_public_https" {
description = "Allow inbound access from the Internet to port 443"
type = string
default = true
}

variable "alb_ssl_policy" {
description = "The SSL policy (aka security policy) for the Application Load Balancer that specifies the TLS protocols and ciphers allowed. See <https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies>."
variable "container_port" {
description = "The port on which the container will receive traffic."
type = string
default = "ELBSecurityPolicy-2016-08"
default = 443
}

variable "alb_idle_timeout" {
description = "The time in seconds that the connection is allowed to be idle."
type = number
default = 60
variable "container_protocol" {
description = "The protocol to use to connect with the container."
type = string
default = "HTTPS"
}

variable "deregistration_delay" {
Expand All @@ -70,16 +67,15 @@ variable "deregistration_delay" {
default = 90
}

variable "load_balancing_algorithm_type" {
description = "Determines how the load balancer selects targets when routing requests. Default is round_robin."
variable "enable_deletion_protection" {
description = " If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer"
type = string
default = "round_robin"
default = false
}

variable "slow_start" {
description = "The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0."
type = number
default = 0
variable "environment" {
description = "Environment tag, e.g prod."
type = string
}

variable "health_check_interval" {
Expand All @@ -88,62 +84,60 @@ variable "health_check_interval" {
default = 30
}

variable "health_check_timeout" {
description = "The health check timeout. Minimum value 2 seconds, Maximum value 60 seconds. Default 5 seconds."
type = string
default = 5
}

variable "health_check_path" {
description = "The destination for the health check requests to the container."
type = string
default = "/"
}

variable "healthy_threshold" {
description = "The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3."
variable "health_check_success_codes" {
description = "The HTTP codes to use when checking for a successful response from the container. You can specify multiple values (for example, '200,202') or a range of values (for example, '200-299')."
type = string
default = 3
default = "200"
}

variable "unhealthy_threshold" {
description = "The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3."
variable "health_check_timeout" {
description = "The health check timeout. Minimum value 2 seconds, Maximum value 60 seconds. Default 5 seconds."
type = string
default = 3
default = 5
}

variable "health_check_success_codes" {
description = "The HTTP codes to use when checking for a successful response from the container. You can specify multiple values (for example, '200,202') or a range of values (for example, '200-299')."
variable "healthy_threshold" {
description = "The number of consecutive health checks successes required before considering an unhealthy target healthy. Defaults to 3."
type = string
default = "200"
default = 3
}

variable "container_port" {
description = "The port on which the container will receive traffic."
variable "load_balancing_algorithm_type" {
description = "Determines how the load balancer selects targets when routing requests. Default is round_robin."
type = string
default = 443
default = "round_robin"
}

variable "container_protocol" {
description = "The protocol to use to connect with the container."
variable "logs_s3_bucket" {
description = "S3 bucket for storing access logs. Set to empty string to disable logs."
type = string
default = "HTTPS"
}

variable "allow_public_http" {
description = "Allow inbound access from the Internet to port 80"
variable "logs_s3_prefix" {
description = "Overrides prefix for ALB logs"
default = ""
type = string
}

variable "logs_s3_prefix_enabled" {
description = "Toggle for ALB logs S3 prefix"
default = true
type = bool
}

variable "allow_public_https" {
description = "Allow inbound access from the Internet to port 443"
variable "name" {
description = "The service name."
type = string
default = true
}

variable "target_group_name" {
description = "Override the default name of the ALB's target group. Must be less than or equal to 32 characters. Default: ecs-[name]-[environment]-[protocol]."
variable "security_group" {
description = "SG for the ALB"
type = string
default = ""
}
Expand All @@ -154,14 +148,20 @@ variable "security_group_tags" {
default = {}
}

variable "security_group" {
description = "SG for the ALB"
variable "slow_start" {
description = "The amount time for targets to warm up before the load balancer sends them a full share of requests. The range is 30-900 seconds or 0 to disable. The default value is 0."
type = number
default = 0
}

variable "target_group_name" {
description = "Override the default name of the ALB's target group. Must be less than or equal to 32 characters. Default: ecs-[name]-[environment]-[protocol]."
type = string
default = ""
}

variable "enable_deletion_protection" {
description = " If true, deletion of the load balancer will be disabled via the AWS API. This will prevent Terraform from deleting the load balancer"
variable "unhealthy_threshold" {
description = "The number of consecutive health check failures required before considering the target unhealthy. For Network Load Balancers, this value must be the same as the healthy_threshold. Defaults to 3."
type = string
default = false
default = 3
}

0 comments on commit 49853d1

Please sign in to comment.