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

Add compute_machine_types datasource #6903

Conversation

modular-magician
Copy link
Collaborator

This implements a plural version of hashicorp/terraform-provider-google#5606 which should solve the same use-cases while also being more flexible.

Specifically, a plural datasource allows a terraform module to be used across regions without needing to override a machine_type variable based on machine type availability. The plural datasource can return an empty list rather than fail the terraform operation if a specific machine type isn't available in the given zone.

Regarding the test, similar to other read-only APIs I'm only checking the existence of attributes rather than requesting a specific machine type and checking its values, since different test environments may have different machine type availability.

Release Note Template for Downstream PRs (will be copied)

`google_compute_machine_types`

Derived from GoogleCloudPlatform/magic-modules#9819

* Add compute_machine_types datasource

* Add documentation for compute_machine_types datasource

[upstream:7a789b657e3de8471a629c449d043255980bbc3f]

Signed-off-by: Modular Magician <[email protected]>
@modular-magician modular-magician merged commit adb10a1 into hashicorp:main Jan 25, 2024
2 checks passed
@modular-magician modular-magician deleted the downstream-pr-7a789b657e3de8471a629c449d043255980bbc3f branch November 16, 2024 02:07
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