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

MIGRATION ISSUE: imagebuilder.LaunchTemplateConfiguration.SetDefaultVersion not sending false value #2734

Open
2 tasks done
ewbankkit opened this issue Aug 6, 2024 · 3 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation. v1-v2-inconsistency v1-v2-inconsistency Behavior has changed from v1 to v2, or feature is missing altogether

Comments

@ewbankkit
Copy link

Pre-Migration Checklist

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

@ewbankkit ewbankkit added needs-triage This issue or PR still needs to be triaged. v1-v2-inconsistency v1-v2-inconsistency Behavior has changed from v1 to v2, or feature is missing altogether labels Aug 6, 2024
@RanVaknin RanVaknin self-assigned this Aug 6, 2024
@ewbankkit
Copy link
Author

ewbankkit commented Aug 6, 2024

Relates aws/aws-sdk#736.
Relates #2162.

@RanVaknin
Copy link
Contributor

Hi @ewbankkit ,

Thanks for raising this once again.
I will re-raise this issue internally to see how we should go about fixing this.

Ran~

@RanVaknin RanVaknin added needs-review This issue or pull request needs review from a core team member. p2 This is a standard priority issue bug This issue is a bug. and removed needs-triage This issue or PR still needs to be triaged. needs-review This issue or pull request needs review from a core team member. labels Aug 6, 2024
@RanVaknin
Copy link
Contributor

RanVaknin commented Aug 8, 2024

We have an internal ticket with the ec2 service team.

V1479153907

Thanks,
Ran~

@RanVaknin RanVaknin closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@lucix-aws lucix-aws reopened this Aug 8, 2024
@RanVaknin RanVaknin added the service-api This issue is due to a problem in a service API, not the SDK implementation. label Aug 8, 2024
@aws aws deleted a comment from github-actions bot Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue service-api This issue is due to a problem in a service API, not the SDK implementation. v1-v2-inconsistency v1-v2-inconsistency Behavior has changed from v1 to v2, or feature is missing altogether
Projects
None yet
Development

No branches or pull requests

3 participants