Skip to content

Add import support to autoscale resources#3

Open
msinhore wants to merge 1 commit into
mainfrom
feature/autoscale-import
Open

Add import support to autoscale resources#3
msinhore wants to merge 1 commit into
mainfrom
feature/autoscale-import

Conversation

@msinhore

Copy link
Copy Markdown

What

Adds a passthrough Importer (id-driven Read — same pattern already used by affinity_group, disk, etc.) to the autoscale chain resources, so existing CloudStack autoscale configurations can be adopted with terraform import / import blocks:

  • cloudstack_counter
  • cloudstack_condition
  • cloudstack_autoscale_policy
  • cloudstack_autoscale_vm_profile
  • cloudstack_autoscale_vm_group

Why

Without an Importer, Terraform refuses to import these resources, so a pre-existing autoscale setup cannot be brought under Terraform management without destroy/recreate.

🤖 Generated with Claude Code

Adds a passthrough Importer (id-driven Read, same pattern as affinity_group
and disk) to the autoscale chain resources so existing CloudStack autoscale
configurations can be adopted with `terraform import` / import blocks:

- cloudstack_counter
- cloudstack_condition
- cloudstack_autoscale_policy
- cloudstack_autoscale_vm_profile
- cloudstack_autoscale_vm_group

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Marco Sinhoreli <msinhore@gmail.com>
@msinhore

Copy link
Copy Markdown
Author

Note for reviewers: the OpenTofu acceptance jobs here are red due to a pre-existing CI bug (expired HashiCorp signing key in hc-install), not this change — fixed by #5. build, RAT and the Terraform matrix pass. Please merge #5 first, then re-run; the OpenTofu matrix will go green.

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