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 support for specifying storage pool when creating a disk. #18273

Conversation

modular-magician
Copy link
Collaborator

Add field storage_pool to google_compute_disk resource to support creating disk with the storage pool in which it will reside.
Instead of adding a resource for storage pool and using resourceRef to let disk reference it, we add the field as a string which will contain the URL for a storage pool. The main reason for this decision is that if we add storage pool as a resource, and in the scenario that users want to destroy a storage pool, Terraform will plan to delete all disks first and then delete the storage pool, which we definitely want to prevent from happening.
Therefore, we eventually decided to not support creating storage pool via Terraform, and only support adding the field for disks to specify existing storage pool. The management of storage pool itself will remain through GCP APIs.

compute: added `storage_pool` field to `google_compute_disk` resource

Derived from GoogleCloudPlatform/magic-modules#10793

…orp#10793)

[upstream:382815b0f9e28398d840b7ed503c97a811280f42]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 4eb2629 into hashicorp:main May 29, 2024
2 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 Jun 30, 2024
This pull request was closed.
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.

1 participant