Skip to content

Latest commit

 

History

History

lattice-instance-target-group

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

lattice-instance-target-group

This module creates following resources.

  • aws_vpclattice_target_group
  • aws_vpclattice_target_group_attachment (optional)

Requirements

Name Version
terraform >= 1.5
aws >= 5.21

Providers

Name Version
aws 5.22.0

Modules

Name Source Version
resource_group tedilabs/misc/aws//modules/resource-group ~> 0.10.0

Resources

Name Type
aws_vpclattice_target_group.this resource
aws_vpclattice_target_group_attachment.this resource

Inputs

Name Description Type Default Required
name (Required) The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. string n/a yes
protocol (Required) The protocol to use for routing traffic to the targets. Valid values are HTTP and HTTPS. string n/a yes
vpc (Required) The ID of the VPC which the target group belongs to. string n/a yes
health_check (Optional) The health check configuration of the target group. The associated service periodically sends requests according to this configuration to the registered targets to test their status. health_check block as defined below.
(Optional) enabled - Whether to enable health check. Defaults to true.
(Optional) protocol - The protocol used when performing health checks on targets. Valid values are HTTP and HTTPS. Defaults to HTTP.
(Optional) protocol_version - The protocol version used when performing health checks on targets. Valid values are HTTP1 and HTTP2. Defaults to HTTP1.
(Optional) port - The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
(Optional) path - The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2, specify a valid URI (for example, /path?query). Health checks are not supported if the protocol version is gRPC, however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI. The maximum length is 1024 characters. Defaults to /.
(Optional) success_codes - The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, 200,202) or a range of values (for example, 200-299). Defaults to 200-299.
(Optional) interval - The approximate amount of time between health checks of an individual target. Valid value range is 5 - 300. Defaults to 30.
(Optional) timeout - The amount of time, in seconds, during which no response means a failed health check. Valid value range is 1 - 120. Defaults to 5.
(Optional) healthy_threshold - The number of consecutive successful health checks required before an unhealthy target is considered healthy. Valid value range is 2 - 10. Defaults to 5.
(Optional) unhealthy_threshold - The number of consecutive health check failures required before considering a target unhealthy. Valid value range is 2 - 10. Defaults to 2.
object({
enabled = optional(bool, true)

port = optional(number)
protocol = optional(string, "HTTP")
protocol_version = optional(string, "HTTP1")
path = optional(string, "/")

success_codes = optional(string, "200-299")

interval = optional(number, 30)
timeout = optional(number, 5)

healthy_threshold = optional(number, 5)
unhealthy_threshold = optional(number, 2)
})
{} no
module_tags_enabled (Optional) Whether to create AWS Resource Tags for the module informations. bool true no
port (Optional) The port on which the target is listening. Valid values are from 1 to 65535. If port is not specified and protocol is HTTP, the value will default to 80. If port is not specified and protocol is HTTPS, the value will default to 443. number null no
protocol_version (Optional) The protocol version. Valid Values are HTTP1, HTTP2 and GRPC. Defaults to HTTP1. string "HTTP1" no
resource_group_description (Optional) The description of Resource Group. string "Managed by Terraform." no
resource_group_enabled (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. bool true no
resource_group_name (Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with AWS or aws. string "" no
tags (Optional) A map of tags to add to all resources. map(string) {} no
targets (Optional) A list of targets to add to the target group. Each value of targets block as defined below.
(Required) name - The name of the target. This value is only used internally within Terraform code.
(Required) instance - This is the Instance ID for an instance.
(Optional) port - This port is used for routing traffic to the target, and defaults to the target group port. However, you can override the default and specify a custom port.
list(object({
name = string
instance = string
port = optional(number)
}))
[] no
timeouts (Optional) How long to wait for the target group to be created/deleted.
object({
create = optional(string, "5m")
delete = optional(string, "5m")
})
{} no

Outputs

Name Description
arn The ARN of the target group.
health_check The health check configuration of the target group.
enabled - Whether to enable health check.
protocol - The protocol used when performing health checks on targets.
protocol_version - The protocol version used when performing health checks on targets.
port - The port used when performing health checks on targets.
path - The destination for health checks on the targets.
success_codes - The HTTP codes to use when checking for a successful response from a target.
interval - The approximate amount of time between health checks of an individual target.
timeout - The amount of time, in seconds, during which no response means a failed health check.
healthy_threshold - The number of consecutive successful health checks required before an unhealthy target is considered healthy.
unhealthy_threshold - The number of consecutive health check failures required before considering a target unhealthy.
id The ID of the target group.
name The name of the target group.
port The port on which the targets are listening.
protocol The protocol to use for routing traffic to the targets.
protocol_version The protocol version.
status The status of the target group.
targets The list of targets of the target group.
name - The name of the target. This value is only used internally within Terraform code.
instance - This is the Instance ID for an instance.
port - The port on which the target is listening.
type The type of target group. Always INSTANCE.
vpc The ID of the VPC which the target group belongs to.