Skip to content

Commit

Permalink
Backwards compatibility for default
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharon Nam authored and Sharon Nam committed Feb 13, 2024
1 parent 00fdd88 commit 79014c5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/service/autoscaling/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ func ResourceGroup() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
// Default: "$Default",
},
},
},
Expand Down Expand Up @@ -752,7 +751,6 @@ func ResourceGroup() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
// Default: "$Default",
},
},
},
Expand Down Expand Up @@ -3174,6 +3172,10 @@ func expandLaunchTemplateSpecificationForMixedInstancesPolicy(tfMap map[string]i
apiObject.LaunchTemplateName = aws.String(v.(string))
}

if tfMap["version"] == "" {
apiObject.Version = aws.String("$Default")
}

if v, ok := tfMap["version"].(string); ok && v != "" {
apiObject.Version = aws.String(v)
}
Expand All @@ -3196,6 +3198,10 @@ func expandLaunchTemplateSpecification(tfMap map[string]interface{}) *autoscalin
apiObject.LaunchTemplateName = aws.String(v.(string))
}

if tfMap["version"] == "" {
apiObject.Version = aws.String("$Default")
}

if v, ok := tfMap["version"].(string); ok && v != "" {
apiObject.Version = aws.String(v)
}
Expand Down

0 comments on commit 79014c5

Please sign in to comment.