Damans227 commented on PR #34:
URL:
https://github.com/apache/cloudstack-terraform-provider/pull/34#issuecomment-1145461162
> great start @Damans227, thanks. I will check and let you know
Yea nw man. I actually fixed it. There was a missing function `d.SetId()`.
It is a function built into the `*schema.ResourceData` API which sets the ID of
a resource. Non-blank IDs are what inform Terraform that a resource exists and
can be read.
```
~/cloudstack-dev/gh-issue-6016/instance
❯ terraform apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI
configuration:
│ - cloudstack/cloudstack in
/home/darora/.terraform.d/plugins/cloudstack-dev/bin
│ - edu/hashicups in
/home/darora/.terraform.d/plugins/hashicorp.com/edu/hashicups/0.3.1/amd64
│
│ The behavior may therefore not match any released version of the provider
and applying changes may cause the state to become
│ incompatible with published releases.
╵
data.cloudstack_instance.my_instance: Reading...
cloudstack_instance.instance-test-b: Refreshing state...
[id=ed55a876-f434-4aa1-840e-2e40249bf199]
cloudstack_instance.instance-test-c: Refreshing state...
[id=9e68b9b1-5434-4cce-bfcf-d7d42b86adc8]
cloudstack_instance.instance-test-a: Refreshing state...
[id=153aa39d-5f61-4cf8-8e17-687ee25807ff]
data.cloudstack_instance.my_instance: Read complete after 0s
[id=153aa39d-5f61-4cf8-8e17-687ee25807ff]
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
instance-output = {
"account" = "admin"
"created" = "2022-06-01T18:24:52+0000"
"display_name" = "server-a"
"host_id" = "24b1a694-9907-4d93-9f3a-583ed2380c21"
"id" = "153aa39d-5f61-4cf8-8e17-687ee25807ff"
"instance_id" = "153aa39d-5f61-4cf8-8e17-687ee25807ff"
"state" = "Running"
"zone_id" = "9a7002b2-09a2-44dc-a332-f2e4e7f01539"
}
```
--
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]