Skip to content

Allow read of PC type from API response to enable non-standard PC imports #9006

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

modular-magician
Copy link
Collaborator

Remove ignore_read on the 'type' parameter of Private Cloud.

Context:

  1. 'type' is an optional and immutable field in the PC resource. If not set by the user, the API response always returns type="STANDARD" post PC creation.
  2. ignore_read was used to retain 'type' as an optional field in terraform and suppress the errors which can arise due to terraform state and API response discrepancies.
  3. This prevented imports of PCs with non-standard types such as "TIME_LIMITED" and "STRETCHED", as the type field would not be read from the API response during the import of the resource and raise warnings to force replacement.

This PR removes ignore_read from the type parameter. The diff suppress on the type field ensures that differences between "" and "STANDARD" types are suppressed to continue supporting the expected behavior as described in point 2.

The acceptance test has been modified to test the import of the resource with different types including "TIME_LIMITED", "STANDARD" AND "".

Release Note Template for Downstream PRs (will be copied)

vmwareengine: allowed import of non-STANDARD private clouds in `google_vmwareengine_private_cloud`

Derived from GoogleCloudPlatform/magic-modules#12690

…orts (#12690)

[upstream:93298a0bc473f313187be3539922d3052b3a257f]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician requested a review from a team as a code owner January 7, 2025 18:00
@modular-magician modular-magician merged commit 1f39225 into hashicorp:main Jan 7, 2025
4 checks passed
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.

1 participant