Closed
Description
Pre-Migration Checklist
- I've read the Migration Guide.
- I've checked AWS Forums and StackOverflow for similar migration issues.
Go Version Used
go1.22.5
Describe the Migration Issue
If the bool SetDefaultVersion
field of the imagebuilder.LaunchTemplateConfiguration
structure is set to false
, that value is not being serialized and sent to the AWS service. The means that it is impossible to update the value from true
to false
via v2 of the Go SDK.
Code Comparison
v1
apiObject := &imagebuilder.LaunchTemplateConfiguration{}
if v, ok := tfMap["launch_template_id"].(string); ok && v != "" {
apiObject.LaunchTemplateId = aws.String(v)
}
if v, ok := tfMap["default"].(bool); ok {
apiObject.SetDefaultVersion = aws.Bool(v)
}
v2
apiObject := &awstypes.LaunchTemplateConfiguration{}
if v, ok := tfMap["launch_template_id"].(string); ok && v != "" {
apiObject.LaunchTemplateId = aws.String(v)
}
if v, ok := tfMap["default"].(bool); ok {
apiObject.SetDefaultVersion = v
}
Observed Differences/Errors
v1
{"distributionConfigurationArn":"arn:aws:imagebuilder:us-west-2:...:distribution-configuration/ewbankkit-test-001","distributions":[{"launchTemplateConfigurations":[{"accountId":"...","launchTemplateId":"lt-00c9b21fbf4907bdb","setDefaultVersion":false}],"region":"us-west-2"}]}
v2
{"distributionConfigurationArn":"arn:aws:imagebuilder:us-west-2:...:distribution-configuration/ewbankkit-test-001","distributions":[{"launchTemplateConfigurations":[{"accountId":"...","launchTemplateId":"lt-00c9b21fbf4907bdb"}],"region":"us-west-2"}]}
Additional Context
No response
Activity