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. #7434

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

[upstream:382815b0f9e28398d840b7ed503c97a811280f42]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 67b37de into hashicorp:main May 29, 2024
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