Skip to content

Add cloudstack_instance_group resource#1

Open
msinhore wants to merge 1 commit into
mainfrom
feature/instance-group
Open

Add cloudstack_instance_group resource#1
msinhore wants to merge 1 commit into
mainfrom
feature/instance-group

Conversation

@msinhore

Copy link
Copy Markdown

What

Adds the cloudstack_instance_group resource (create/read/update/delete via the CloudStack instance-group APIs), registered in the provider's ResourcesMap, with acceptance tests and website documentation.

Why

Instance groups let operators organize VMs (and are surfaced by tooling such as the topology designer). The provider previously had no way to manage them.

Files

  • cloudstack/resource_cloudstack_instance_group.go (+ test)
  • website/docs/r/instance_group.html.markdown
  • cloudstack/provider.go (registration)

🤖 Generated with Claude Code

Introduces the `cloudstack_instance_group` resource (create/read/update/delete
via the CloudStack instance-group APIs), with acceptance tests and documentation,
and registers it in the provider's ResourcesMap.

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

Copy link
Copy Markdown
Author

Heads-up: this PR's failures are not the OpenTofu CI bug — the cloudstack_instance_group acceptance tests fail on all Terraform jobs too. Root cause: the resource creates an empty instance group, but the simulator's listInstanceGroups does not return a group with no instances, so the post-create Read clears the ID ("Provider produced inconsistent result after apply"); the _update/_import cases then hit "group already exists" from the leaked group.

Instance groups in CloudStack are normally created implicitly by deploying a VM with a group attribute, so a standalone empty-group resource is awkward to test on the simulator. Suggest holding this PR (draft/close) and revisiting with an acceptance test that deploys a VM into the group, in an environment where it can be validated. The other PRs (#2#5) don't depend on it.

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