feat(terraform): add volume backup exclusion resource (EON-7912)#71
Open
atlowChemi wants to merge 2 commits intomainfrom
Open
feat(terraform): add volume backup exclusion resource (EON-7912)#71atlowChemi wants to merge 2 commits intomainfrom
atlowChemi wants to merge 2 commits intomainfrom
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Companion PR to eon-io/eon-service#28165. Adds a new
eon_volume_backup_exclusionTerraform resource that allows excluding specific EBS volumes from future EC2 instance backups.ExcludeVolumeFromBackup,CancelVolumeBackupExclusion) callingPATCH /v1/projects/{projectId}/resources/{id}/volumes/{volumeId}/excludeand.../include. Uses raw HTTP (same pattern asStartBigQueryDatasetRestore) because the SDK doesn't have these endpoints yet.eon_volume_backup_exclusion— create excludes, destroy re-includes. Both attributes (resource_id,volume_id) require replacement on change. Supports import viaresource_id/volume_idformat.Readjust persists state. No drift detection.go generate ./...usingterraform-plugin-docs.Review & Testing Checklist for Human
/resources/{id}/volumes/{volumeId}/excludeand/include) match the OpenAPI spec in eon-service#28165 exactly — a mismatch here would cause silent 404s at runtime.Read: The resource cannot detect drift — if a volume is re-included outside Terraform, state won't update. Decide if this is acceptable or if a read-back mechanism is needed.ImportStatesets state without calling any API. An import of a non-existent or non-excluded volume will succeed silently.Suggested test plan: After the eon-service PR is merged, apply the resource against a real EC2 instance with multiple volumes, verify the non-root volume becomes excluded, then
terraform destroyand verify it's re-included.Notes
golangci-lintconfig needs aversionfield for golangci-lint v2 — this is a pre-existing issue, not introduced by this PR.go vetandgo testboth pass cleanly.nil(no error tracking), consistent with existing mock patterns.Link to Devin session: https://eon.devinenterprise.com/sessions/0a6eebe354004283bfc89ebb9daee533
Requested by: @atlowChemi