sudo87 opened a new pull request, #319: URL: https://github.com/apache/cloudstack-terraform-provider/pull/319
## What `data.cloudstack_instance` couldn't find instances deployed inside a project. It always failed with `No instance is matching with the specified regex`, even when the instance clearly existed. ## Why The data source called `ListVirtualMachines` without a `projectid`, so project-scoped instances never showed up in the list, and the filter had nothing to match. The error message just didn't say why. ## Fix Added a `project` argument to the data source and pass it through with the same `setProjectid` helper the VPC data source already uses. Also set `project` on the result so it's exported like the other attributes. ## Testing Ran against the CloudStack simulator: - New `TestAccInstanceDataSource_project` reproduces the bug and confirms the fix - Existing `TestAccInstanceDataSource_basic` and the full `TestAccCloudStackInstance_*` suite still pass - `go build`, `go vet`, `gofmt` all clean Fixes #266 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
