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

Address permadiff in vm-instance module #542

Merged

Conversation

tpdownes
Copy link
Member

When used to provision A2 machine types, using the empty list as the default value of guest_accelerator causes a permadiff because the Compute Engine API reports the A2's A100 GPU card and we have chosen an explicit value. If, instead, we use a null value for guest_accelerator, Terraform treats the difference as not requiring action.

Submission Checklist

  • Have you installed and run this change against pre-commit? (pre-commit install)
  • Are all tests passing? (make tests)
  • Have you written unit tests to cover this change?
  • Is unit test coverage still above 80%?
  • Have you updated all applicable documentation?
  • Have you followed the guidelines in our Contributing document?

When used to provision A2 machine types, using the empty list as the
default value of guest_accelerator causes a permadiff because the
Compute Engine API reports the A2's A100 GPU card and we have chosen an
explicit value. If, instead, we use a null value for guest_accelerator,
Terraform treats the difference as not requiring action.
Copy link
Contributor

@heyealex heyealex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran a quick test to be sure, and everything looks good.

@heyealex heyealex assigned tpdownes and unassigned heyealex Sep 12, 2022
@tpdownes tpdownes merged commit 14cc4eb into GoogleCloudPlatform:develop Sep 12, 2022
@tpdownes tpdownes deleted the fix_guest_accelerator branch September 12, 2022 23:00
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.

2 participants