add support for enabling delete protection#268
Open
Curverneur wants to merge 5 commits intoapache:mainfrom
Open
add support for enabling delete protection#268Curverneur wants to merge 5 commits intoapache:mainfrom
Curverneur wants to merge 5 commits intoapache:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds delete protection support for CloudStack instances (virtual machines) and volumes (disks) by introducing a new deleteprotection boolean field to both the cloudstack_instance and cloudstack_disk resources. The feature integrates with CloudStack's API updateVirtualMachine and updateVolume endpoints to enable protection against accidental deletion.
Key Changes:
- Added
deleteprotectionoptional boolean field to instance and disk resource schemas - Implemented delete protection setting via CloudStack update APIs after resource creation
- Updated documentation for both resources with usage notes about limitations when resources are managed by other services
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
cloudstack/resource_cloudstack_instance.go |
Added deleteprotection schema field and implementation to set/update protection via UpdateVirtualMachine API |
cloudstack/resource_cloudstack_disk.go |
Added deleteprotection schema field and implementation to set/update protection via UpdateVolume API |
website/docs/r/instance.html.markdown |
Documented deleteprotection parameter with usage notes and reformatted userdata_id/userdata_details entries |
website/docs/r/disk.html.markdown |
Documented deleteprotection parameter with usage notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Author
|
looks like some checks failed due to connection issues. could you check and trigger them again, please? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add support for enabling the delete protection for instances (virtual machines) and volumes (disks).
Reason
This feature allows users to enable the delete protection for certain resources to prevent accidental deletion.
References
Changes
Added deleteprotection option to
cloudstack_instanceandcloudstack_diskresource and updated the corresponding documentation pages.cloudstack/resource_cloudstack_instance.gocloudstack/resource_cloudstack_disk.gowebsite/docs/r/instance.html.markdownwebsite/docs/r/disk.html.markdown