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

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 requested a review from a team as a code owner May 29, 2024 21:42
@modular-magician modular-magician requested review from shuyama1 and removed request for a team May 29, 2024 21:42
@modular-magician modular-magician merged commit 9c675c5 into GoogleCloudPlatform:main May 29, 2024
4 of 5 checks passed
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

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