Difference between revisions of "Terraform resource: aws lb target group"
Jump to navigation
Jump to search
↑ 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
Line 15: | Line 15: | ||
} | } | ||
− | == Attributes | + | == Attributes reference == |
* <code>[[arn_suffix]]</code> - ARN suffix for use with CloudWatch Metrics. | * <code>[[arn_suffix]]</code> - ARN suffix for use with CloudWatch Metrics. | ||
* <code>[[arn]]</code> - ARN of the [[Target Group]] (matches id). | * <code>[[arn]]</code> - ARN of the [[Target Group]] (matches id). | ||
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]] | + | * <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>[[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:06, 2 March 2023
- Terraform resource:
aws_lb_target_group
[1]
Contents
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
arn_suffix
- ARN suffix for use with CloudWatch Metrics.arn
- ARN of the Target Group (matches id).id
- ARN of the Target Group (matches arn).name
- Name of the Target Group.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.type
: The type of sticky sessions. The only current possible values arelb_cookie
,app_cookie
for ALBs, andsource_ip
for NLBs. https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#typefixed_response
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_rule#fixed_responsetarget_type
:instance
,ip
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_target_group#target_typevpc_id
protocol
:[2] GENEVE, HTTP, HTTPS, TCP, TCP_UDP, TLS, or UDPprotocol_version
: HTTP1, GRPC, HTTP2 [3]health_check
[4]
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
- Terraform AWS provider:
aws_lb_target_group
,target_group_arn
,aws lb target group - fixed response
- Terraform AWS: providers, modules, resources
hashicorp/aws
- Terraform AWS resources: IAM, Net, EC2, ECS, ECR, S3, Route53, ACM, CloudWatch, CloudFront SES, RDS, DLM
Advertising: