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

Add preserve_client_ip attribute support in aws_lb_target_group resource #17731

Merged
merged 12 commits into from
Mar 30, 2021
3 changes: 3 additions & 0 deletions .changelog/17731.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/aws_lb_target_group: Add preserve_client_ip target attribute support
```
155 changes: 68 additions & 87 deletions aws/data_source_aws_lb_target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,69 +18,15 @@ func dataSourceAwsLbTargetGroup() *schema.Resource {
Optional: true,
Computed: true,
},

"arn_suffix": {
Type: schema.TypeString,
Computed: true,
},

"name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},

"port": {
Type: schema.TypeInt,
Computed: true,
},

"protocol": {
Type: schema.TypeString,
Computed: true,
},

"protocol_version": {
Type: schema.TypeString,
Computed: true,
},

"vpc_id": {
Type: schema.TypeString,
Computed: true,
},

"deregistration_delay": {
Type: schema.TypeInt,
Computed: true,
},

"slow_start": {
Type: schema.TypeInt,
Computed: true,
},

"proxy_protocol_v2": {
Type: schema.TypeBool,
Computed: true,
},

"lambda_multi_value_headers_enabled": {
Type: schema.TypeBool,
Computed: true,
},

"load_balancing_algorithm_type": {
Type: schema.TypeString,
Computed: true,
},

"target_type": {
Type: schema.TypeString,
Computed: true,
},

"stickiness": {
"health_check": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Expand All @@ -89,72 +35,107 @@ func dataSourceAwsLbTargetGroup() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
"cookie_duration": {
"healthy_threshold": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},

"health_check": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Computed: true,
},

"interval": {
Type: schema.TypeInt,
Computed: true,
},

"matcher": {
Type: schema.TypeString,
Computed: true,
},
"path": {
Type: schema.TypeString,
Computed: true,
},

"port": {
Type: schema.TypeString,
Computed: true,
},

"protocol": {
Type: schema.TypeString,
Computed: true,
},

"timeout": {
Type: schema.TypeInt,
Computed: true,
},

"healthy_threshold": {
"unhealthy_threshold": {
Type: schema.TypeInt,
Computed: true,
},

"matcher": {
Type: schema.TypeString,
},
},
},
"lambda_multi_value_headers_enabled": {
Type: schema.TypeBool,
Computed: true,
},
"load_balancing_algorithm_type": {
Type: schema.TypeString,
Computed: true,
},
"name": {
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"port": {
Type: schema.TypeInt,
Computed: true,
},
"preserve_client_ip": {
Type: schema.TypeString,
Computed: true,
},
"protocol": {
Type: schema.TypeString,
Computed: true,
},
"protocol_version": {
Type: schema.TypeString,
Computed: true,
},
"proxy_protocol_v2": {
Type: schema.TypeBool,
Computed: true,
},
"slow_start": {
Type: schema.TypeInt,
Computed: true,
},
"stickiness": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cookie_duration": {
Type: schema.TypeInt,
Computed: true,
},

"unhealthy_threshold": {
Type: schema.TypeInt,
"enabled": {
Type: schema.TypeBool,
Computed: true,
},
"type": {
Type: schema.TypeString,
Computed: true,
},
},
},
},

"target_type": {
Type: schema.TypeString,
Computed: true,
},
"tags": tagsSchemaComputed(),
"vpc_id": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down
Loading