Skip to content

Commit 460bfef

Browse files
authored
Merge pull request #67 from poddm/zonewizard
Zonewizard
2 parents 6fbf6ff + ae52fee commit 460bfef

31 files changed

+2760
-273
lines changed

cloudstack/data_source_cloudstack_physicalnetwork_test.go renamed to cloudstack/data_source_cloudstack_physical_network_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func TestAccDataSourceCloudStackPhysicalNetwork_basic(t *testing.T) {
3434
Config: testAccDataSourceCloudStackPhysicalNetwork_basic,
3535
Check: resource.ComposeTestCheckFunc(
3636
resource.TestCheckResourceAttr(
37-
"data.cloudstack_physicalnetwork.foo", "name", "terraform-physical-network"),
37+
"data.cloudstack_physical_network.foo", "name", "terraform-physical-network"),
3838
resource.TestCheckResourceAttr(
39-
"data.cloudstack_physicalnetwork.foo", "broadcast_domain_range", "ZONE"),
39+
"data.cloudstack_physical_network.foo", "broadcast_domain_range", "ZONE"),
4040
),
4141
},
4242
},
@@ -51,17 +51,18 @@ resource "cloudstack_zone" "foo" {
5151
network_type = "Advanced"
5252
}
5353
54-
resource "cloudstack_physicalnetwork" "foo" {
54+
resource "cloudstack_physical_network" "foo" {
5555
name = "terraform-physical-network"
56-
zone = cloudstack_zone.foo.name
56+
zone_id = cloudstack_zone.foo.id
5757
broadcast_domain_range = "ZONE"
5858
isolation_methods = ["VLAN"]
5959
}
6060
61-
data "cloudstack_physicalnetwork" "foo" {
61+
data "cloudstack_physical_network" "foo" {
6262
filter {
6363
name = "name"
6464
value = "terraform-physical-network"
6565
}
66-
depends_on = [cloudstack_physicalnetwork.foo]
67-
}`
66+
depends_on = [cloudstack_physical_network.foo]
67+
}
68+
`

cloudstack/provider.go

Lines changed: 49 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -91,53 +91,59 @@ func Provider() *schema.Provider {
9191
"cloudstack_vpn_connection": dataSourceCloudstackVPNConnection(),
9292
"cloudstack_pod": dataSourceCloudstackPod(),
9393
"cloudstack_domain": dataSourceCloudstackDomain(),
94-
"cloudstack_physicalnetwork": dataSourceCloudStackPhysicalNetwork(),
94+
"cloudstack_physical_network": dataSourceCloudStackPhysicalNetwork(),
9595
"cloudstack_role": dataSourceCloudstackRole(),
9696
},
9797

9898
ResourcesMap: map[string]*schema.Resource{
99-
"cloudstack_affinity_group": resourceCloudStackAffinityGroup(),
100-
"cloudstack_attach_volume": resourceCloudStackAttachVolume(),
101-
"cloudstack_autoscale_vm_profile": resourceCloudStackAutoScaleVMProfile(),
102-
"cloudstack_configuration": resourceCloudStackConfiguration(),
103-
"cloudstack_disk": resourceCloudStackDisk(),
104-
"cloudstack_egress_firewall": resourceCloudStackEgressFirewall(),
105-
"cloudstack_firewall": resourceCloudStackFirewall(),
106-
"cloudstack_host": resourceCloudStackHost(),
107-
"cloudstack_instance": resourceCloudStackInstance(),
108-
"cloudstack_ipaddress": resourceCloudStackIPAddress(),
109-
"cloudstack_kubernetes_cluster": resourceCloudStackKubernetesCluster(),
110-
"cloudstack_kubernetes_version": resourceCloudStackKubernetesVersion(),
111-
"cloudstack_loadbalancer_rule": resourceCloudStackLoadBalancerRule(),
112-
"cloudstack_network": resourceCloudStackNetwork(),
113-
"cloudstack_network_acl": resourceCloudStackNetworkACL(),
114-
"cloudstack_network_acl_rule": resourceCloudStackNetworkACLRule(),
115-
"cloudstack_nic": resourceCloudStackNIC(),
116-
"cloudstack_port_forward": resourceCloudStackPortForward(),
117-
"cloudstack_private_gateway": resourceCloudStackPrivateGateway(),
118-
"cloudstack_secondary_ipaddress": resourceCloudStackSecondaryIPAddress(),
119-
"cloudstack_security_group": resourceCloudStackSecurityGroup(),
120-
"cloudstack_security_group_rule": resourceCloudStackSecurityGroupRule(),
121-
"cloudstack_ssh_keypair": resourceCloudStackSSHKeyPair(),
122-
"cloudstack_static_nat": resourceCloudStackStaticNAT(),
123-
"cloudstack_static_route": resourceCloudStackStaticRoute(),
124-
"cloudstack_template": resourceCloudStackTemplate(),
125-
"cloudstack_vpc": resourceCloudStackVPC(),
126-
"cloudstack_vpn_connection": resourceCloudStackVPNConnection(),
127-
"cloudstack_vpn_customer_gateway": resourceCloudStackVPNCustomerGateway(),
128-
"cloudstack_vpn_gateway": resourceCloudStackVPNGateway(),
129-
"cloudstack_network_offering": resourceCloudStackNetworkOffering(),
130-
"cloudstack_disk_offering": resourceCloudStackDiskOffering(),
131-
"cloudstack_volume": resourceCloudStackVolume(),
132-
"cloudstack_zone": resourceCloudStackZone(),
133-
"cloudstack_service_offering": resourceCloudStackServiceOffering(),
134-
"cloudstack_account": resourceCloudStackAccount(),
135-
"cloudstack_user": resourceCloudStackUser(),
136-
"cloudstack_domain": resourceCloudStackDomain(),
137-
"cloudstack_physicalnetwork": resourceCloudStackPhysicalNetwork(),
138-
"cloudstack_traffic_type": resourceCloudStackTrafficType(),
139-
"cloudstack_network_service_provider": resourceCloudStackNetworkServiceProvider(),
140-
"cloudstack_role": resourceCloudStackRole(),
99+
"cloudstack_affinity_group": resourceCloudStackAffinityGroup(),
100+
"cloudstack_attach_volume": resourceCloudStackAttachVolume(),
101+
"cloudstack_autoscale_vm_profile": resourceCloudStackAutoScaleVMProfile(),
102+
"cloudstack_configuration": resourceCloudStackConfiguration(),
103+
"cloudstack_cluster": resourceCloudStackCluster(),
104+
"cloudstack_disk": resourceCloudStackDisk(),
105+
"cloudstack_egress_firewall": resourceCloudStackEgressFirewall(),
106+
"cloudstack_firewall": resourceCloudStackFirewall(),
107+
"cloudstack_host": resourceCloudStackHost(),
108+
"cloudstack_instance": resourceCloudStackInstance(),
109+
"cloudstack_ipaddress": resourceCloudStackIPAddress(),
110+
"cloudstack_kubernetes_cluster": resourceCloudStackKubernetesCluster(),
111+
"cloudstack_kubernetes_version": resourceCloudStackKubernetesVersion(),
112+
"cloudstack_loadbalancer_rule": resourceCloudStackLoadBalancerRule(),
113+
"cloudstack_network": resourceCloudStackNetwork(),
114+
"cloudstack_network_acl": resourceCloudStackNetworkACL(),
115+
"cloudstack_network_acl_rule": resourceCloudStackNetworkACLRule(),
116+
"cloudstack_nic": resourceCloudStackNIC(),
117+
"cloudstack_physical_network": resourceCloudStackPhysicalNetwork(),
118+
"cloudstack_pod": resourceCloudStackPod(),
119+
"cloudstack_port_forward": resourceCloudStackPortForward(),
120+
"cloudstack_network_service_provider_state": resourceCloudStackNetworkServiceProviderState(),
121+
"cloudstack_private_gateway": resourceCloudStackPrivateGateway(),
122+
"cloudstack_secondary_ipaddress": resourceCloudStackSecondaryIPAddress(),
123+
"cloudstack_secondary_storage": resourceCloudStackSecondaryStorage(),
124+
"cloudstack_security_group": resourceCloudStackSecurityGroup(),
125+
"cloudstack_security_group_rule": resourceCloudStackSecurityGroupRule(),
126+
"cloudstack_ssh_keypair": resourceCloudStackSSHKeyPair(),
127+
"cloudstack_static_nat": resourceCloudStackStaticNAT(),
128+
"cloudstack_static_route": resourceCloudStackStaticRoute(),
129+
"cloudstack_storage_pool": resourceCloudStackStoragePool(),
130+
"cloudstack_template": resourceCloudStackTemplate(),
131+
"cloudstack_traffic_type": resourceCloudStackTrafficType(),
132+
"cloudstack_vpc": resourceCloudStackVPC(),
133+
"cloudstack_vpn_connection": resourceCloudStackVPNConnection(),
134+
"cloudstack_vpn_customer_gateway": resourceCloudStackVPNCustomerGateway(),
135+
"cloudstack_vpn_gateway": resourceCloudStackVPNGateway(),
136+
"cloudstack_network_offering": resourceCloudStackNetworkOffering(),
137+
"cloudstack_disk_offering": resourceCloudStackDiskOffering(),
138+
"cloudstack_vlan_ip_range": resourceCloudstackVlanIpRange(),
139+
"cloudstack_volume": resourceCloudStackVolume(),
140+
"cloudstack_zone": resourceCloudStackZone(),
141+
"cloudstack_service_offering": resourceCloudStackServiceOffering(),
142+
"cloudstack_account": resourceCloudStackAccount(),
143+
"cloudstack_user": resourceCloudStackUser(),
144+
"cloudstack_domain": resourceCloudStackDomain(),
145+
"cloudstack_network_service_provider": resourceCloudStackNetworkServiceProvider(),
146+
"cloudstack_role": resourceCloudStackRole(),
141147
},
142148

143149
ConfigureFunc: providerConfigure,

0 commit comments

Comments
 (0)