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

Allow volumes to not be managed by Magic Castle (instead, use existing ones) #339

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
prevent destroying the volume is managed = false
  • Loading branch information
mboisson committed Jan 15, 2025
commit d531f99c64734c2b9e9968868f9fd6bbac6801e1
3 changes: 3 additions & 0 deletions openstack/infrastructure.tf
Original file line number Diff line number Diff line change
@@ -107,6 +107,9 @@ resource "openstack_blockstorage_volume_v3" "volumes" {
volume_type = lookup(each.value, "type", null)
snapshot_id = lookup(each.value, "snapshot", null)
enable_online_resize = lookup(each.value, "enable_resize", false)
lifecycle {
prevent_destroy = ! lookup(values, "managed", true)
}
}
data "openstack_blockstorage_volume_v3" "existing_volumes" {
for_each = {