ianc769 opened a new pull request, #217: URL: https://github.com/apache/cloudstack-terraform-provider/pull/217
Adding `cloudstack_pod` as a terraform managed resource option -> https://cloudstack.apache.org/api/apidocs-4.20/apis/createPod.html Adding `cloudstack_cluster` as a terraform managed resource option -> https://cloudstack.apache.org/api/apidocs-4.20/apis/addCluster.html Using this code for example: ```hcl resource "cloudstack_zone" "zone" { name = "Terraform Zone" dns1 = "8.8.8.8" internal_dns1 = "8.8.8.8" network_type = "Basic" securitygroupenabled = false domain = var.dns_domain } resource "cloudstack_pod" "foopod" { name = "terraform-pod" zone_id = cloudstack_zone.zone.id gateway = "192.168.56.1" netmask = "255.255.255.0" start_ip = "192.168.56.2" end_ip = "192.168.56.254" } resource "cloudstack_cluster" "foo" { name = "terraform-cluster" cluster_type = "CloudManaged" hypervisor = "KVM" pod_id = cloudstack_pod.foopod.id zone_id = cloudstack_zone.zone.id arch = "x86_64" } ``` ```bash # cloudstack_cluster.foo will be created + resource "cloudstack_cluster" "foo" { + allocation_state = (known after apply) + arch = "x86_64" + cluster_type = "CloudManaged" + cpu_overcommit_ratio = (known after apply) + hypervisor = "KVM" + id = (known after apply) + managed_state = (known after apply) + memory_overcommit_ratio = (known after apply) + name = "terraform-cluster" + ovm3vip = (known after apply) + pod_id = (known after apply) + pod_name = (known after apply) + zone_id = (known after apply) + zone_name = (known after apply) } # cloudstack_pod.foopod will be created + resource "cloudstack_pod" "foopod" { + allocation_state = (known after apply) + end_ip = "192.168.56.254" + gateway = "192.168.56.1" + id = (known after apply) + name = "terraform-pod" + netmask = "255.255.255.0" + start_ip = "192.168.56.2" + vlan_id = (known after apply) + zone_id = (known after apply) + zone_name = (known after apply) } # cloudstack_zone.zone will be created + resource "cloudstack_zone" "zone" { + allocationstate = (known after apply) + dns1 = "8.8.8.8" + domain = "dev.example.com" + id = (known after apply) + internal_dns1 = "8.8.8.8" + name = "Terraform Zone" + network_type = "Basic" + securitygroupenabled = false } ``` ```bash Enter a value: yes cloudstack_zone.zone: Creating... cloudstack_zone.zone: Creation complete after 1s [id=ea20f61a-b65e-429b-9209-1c041c7416a4] cloudstack_pod.foopod: Creating... cloudstack_pod.foopod: Creation complete after 2s [id=4819a4bf-fcf6-49cc-80b2-d7ad50f8e702] cloudstack_cluster.foo: Creating... cloudstack_cluster.foo: Creation complete after 0s [id=6a82196f-d1d0-4b71-ab14-f8fabedb4b23] Apply complete! Resources: 3 added, 1 changed, 0 destroyed. ``` <img width="373" height="327" alt="{3B5DA58B-7F21-4945-BD40-7AFFE1CC2C16}" src="https://github.com/user-attachments/assets/ee7dfc88-330a-413a-aa72-eec288bdb31c" /> <img width="447" height="604" alt="{9638119C-5B19-41CE-BA25-FD32BB20648D}" src="https://github.com/user-attachments/assets/97186b83-5c47-40e3-93e1-31ead7902f79" /> -- 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]
