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 #17107

Conversation

modular-magician
Copy link
Collaborator

This implements a plural version of #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 <magic-modules@google.com>
@modular-magician modular-magician merged commit a639325 into hashicorp:main Jan 25, 2024
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant