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

[0.5.1] import and refresh populate fields with invalid "null" value #312

Closed
danimo opened this issue Jul 8, 2022 · 1 comment · Fixed by #378
Closed

[0.5.1] import and refresh populate fields with invalid "null" value #312

danimo opened this issue Jul 8, 2022 · 1 comment · Fixed by #378

Comments

@danimo
Copy link

danimo commented Jul 8, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.2.2

Affected Resource(s)

  • opennebula_virtual_machine

Expected Behavior

terraform import and terraform refresh import values with a meaningful default

Actual Behavior

terraform import and terraform refresh set a lot of values to null, causing problem during operation. Examples:

during refresh:

  • template_id: null should be -1
  • nic_template: null should be []
  • disk_template: null should be []

during import:

  • timeout: null should be a reasonable numerical value (gets implicitly cast to 0, which means e.g. terraform destroy cannot succeed).

Alternatively, the module should handle null values gracefully, but it stands to reason that whatever is in the state should be non-ambiguous.

Steps to Reproduce

  1. Run terraform refresh on an inventory created with an older version
  2. Run terraform import on an existing machine id
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity and it has not the 'status: confirmed' label or it is not in a milestone. Remove the 'status: stale' label or comment, or this will be closed in 5 days.

@frousselet frousselet added this to the 1.1.0 milestone Sep 7, 2022
@frousselet frousselet modified the milestones: 1.1.0, 1.1.1 Nov 28, 2022
treywelsh added a commit that referenced this issue Dec 6, 2022
treywelsh added a commit that referenced this issue Dec 7, 2022
treywelsh added a commit that referenced this issue Dec 8, 2022
treywelsh added a commit that referenced this issue Dec 8, 2022
treywelsh added a commit that referenced this issue Dec 14, 2022
treywelsh added a commit that referenced this issue Dec 14, 2022
treywelsh added a commit that referenced this issue Dec 14, 2022
frousselet pushed a commit that referenced this issue Jan 7, 2023
frousselet pushed a commit that referenced this issue Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants