Difference between revisions of "Terraform resource: aws lb target group"

From wikieduonline
Jump to navigation Jump to search
Line 26: Line 26:
 
* <code>[[vpc_id]]</code>
 
* <code>[[vpc_id]]</code>
 
* <code>[[protocol]]</code>:<ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol</ref> [[GENEVE]], HTTP, HTTPS, TCP, [[TCP_UDP]], TLS, or UDP
 
* <code>[[protocol]]</code>:<ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol</ref> [[GENEVE]], HTTP, HTTPS, TCP, [[TCP_UDP]], TLS, or UDP
* <code>[[protocol_version]]</code>: [[HTTP1]], [[GRPC]], [[HTTP2]] <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version</ref>
+
* <code>[[protocol_version]]</code> (optional): [[HTTP1]] (default), [[GRPC]], [[HTTP2]] <ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version</ref>
 
* <code>[[health_check]]</code><ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check</ref>
 
* <code>[[health_check]]</code><ref>https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check</ref>
  

Revision as of 23:07, 2 March 2023

Examples

resource "aws_lb_target_group" "ip-example" {
 name        = "tf-example-lb-tg"
 port        = 80
 protocol    = "HTTP"
 target_type = "ip"
 vpc_id      = aws_vpc.main.id
}

resource "aws_vpc" "main" {
 cidr_block = "10.0.0.0/16"
}

Attributes reference

Example Instance Target Group

resource "aws_lb_target_group" "test" {
  name     = "tf-example-lb-tg"
  port     = 80
  protocol = "HTTP"
  vpc_id   = aws_vpc.main.id
} 

resource "aws_vpc" "main" {
  cidr_block = "10.0.0.0/16"
}

Related terms

See also

  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group
  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol
  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#protocol_version
  • https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#health_check
  • Advertising: