Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/44500.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_lb_target_group: Suppress diff for `stickiness`, `target_failover`, and `target_group_health` attributes when `target_type` is `lambda`
```
25 changes: 14 additions & 11 deletions internal/service/elbv2/target_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,11 @@ func resourceTargetGroup() *schema.Resource {
),
},
"stickiness": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
DiffSuppressFunc: suppressIfTargetType(awstypes.TargetTypeEnumLambda),
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"cookie_duration": {
Expand Down Expand Up @@ -297,9 +298,10 @@ func resourceTargetGroup() *schema.Resource {
names.AttrTags: tftags.TagsSchema(),
names.AttrTagsAll: tftags.TagsSchemaComputed(),
"target_failover": {
Type: schema.TypeList,
Optional: true,
Computed: true,
Type: schema.TypeList,
Optional: true,
Computed: true,
DiffSuppressFunc: suppressIfTargetType(awstypes.TargetTypeEnumLambda),
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"on_deregistration": {
Expand All @@ -316,10 +318,11 @@ func resourceTargetGroup() *schema.Resource {
},
},
"target_group_health": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
DiffSuppressFunc: suppressIfTargetType(awstypes.TargetTypeEnumLambda),
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"dns_failover": {
Expand Down
Loading