Skip to content

fix: Update linuxParameters conditional and defaults #330

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

Conversation

magreenbaum
Copy link
Member

Description

The defaults for linuxParameters were not allowing the conditional here to evaluate. linuxParameters would always contain initProcessEnabled = false since it was a default, unless the user explicitly set this parameter.

Additionally, the for loop to remove null values has to be done on the variable rather than the local variable since the variable has the object types defined. If we just removed the defaults and left the for loop to remove null values from the local values, then object defaults would be null and the map would merge with null values and result in null and initProcessEnabled wouldn't be set at all unless explicitly defined.

Motivation and Context

Stems from: #319 (comment)

Breaking Changes

No.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs
Copy link
Member

started looking at this today, will continue tomorrow - tl;dr - the variable optional attributes are quite a mess and a lot of our prior logic doesn't work because now theres always null (or something else), where previously we didn't have anything unless we specified it

@bryantbiggs
Copy link
Member

relates to hashicorp/terraform-provider-aws#17988

@antonbabenko
Copy link
Member

This issue has been resolved in version 6.1.4 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants