@@ -21,7 +21,7 @@ func TestAccCloudStackFirewall_basic(t *testing.T) {
2121 Check : resource .ComposeTestCheckFunc (
2222 testAccCheckCloudStackFirewallRulesExist ("cloudstack_firewall.foo" ),
2323 resource .TestCheckResourceAttr (
24- "cloudstack_firewall.foo" , "ipaddress " , CLOUDSTACK_PUBLIC_IPADDRESS ),
24+ "cloudstack_firewall.foo" , "ip_address " , CLOUDSTACK_PUBLIC_IPADDRESS ),
2525 resource .TestCheckResourceAttr (
2626 "cloudstack_firewall.foo" , "rule.#" , "2" ),
2727 resource .TestCheckResourceAttr (
@@ -31,13 +31,13 @@ func TestAccCloudStackFirewall_basic(t *testing.T) {
3131 resource .TestCheckResourceAttr (
3232 "cloudstack_firewall.foo" , "rule.60926170.ports.32925333" , "8080" ),
3333 resource .TestCheckResourceAttr (
34- "cloudstack_firewall.foo" , "rule.716592205.source_cidr " , "10.0.0.0/24" ),
34+ "cloudstack_firewall.foo" , "rule.3832507136.cidr_list.3482919157 " , "10.0.0.0/24" ),
3535 resource .TestCheckResourceAttr (
36- "cloudstack_firewall.foo" , "rule.716592205 .protocol" , "tcp" ),
36+ "cloudstack_firewall.foo" , "rule.3832507136 .protocol" , "tcp" ),
3737 resource .TestCheckResourceAttr (
38- "cloudstack_firewall.foo" , "rule.716592205 .ports.1209010669" , "1000-2000" ),
38+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1209010669" , "1000-2000" ),
3939 resource .TestCheckResourceAttr (
40- "cloudstack_firewall.foo" , "rule.716592205 .ports.1889509032" , "80" ),
40+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1889509032" , "80" ),
4141 ),
4242 },
4343 },
@@ -55,7 +55,7 @@ func TestAccCloudStackFirewall_update(t *testing.T) {
5555 Check : resource .ComposeTestCheckFunc (
5656 testAccCheckCloudStackFirewallRulesExist ("cloudstack_firewall.foo" ),
5757 resource .TestCheckResourceAttr (
58- "cloudstack_firewall.foo" , "ipaddress " , CLOUDSTACK_PUBLIC_IPADDRESS ),
58+ "cloudstack_firewall.foo" , "ip_address " , CLOUDSTACK_PUBLIC_IPADDRESS ),
5959 resource .TestCheckResourceAttr (
6060 "cloudstack_firewall.foo" , "rule.#" , "2" ),
6161 resource .TestCheckResourceAttr (
@@ -65,13 +65,13 @@ func TestAccCloudStackFirewall_update(t *testing.T) {
6565 resource .TestCheckResourceAttr (
6666 "cloudstack_firewall.foo" , "rule.60926170.ports.32925333" , "8080" ),
6767 resource .TestCheckResourceAttr (
68- "cloudstack_firewall.foo" , "rule.716592205.source_cidr " , "10.0.0.0/24" ),
68+ "cloudstack_firewall.foo" , "rule.3832507136.cidr_list.3482919157 " , "10.0.0.0/24" ),
6969 resource .TestCheckResourceAttr (
70- "cloudstack_firewall.foo" , "rule.716592205 .protocol" , "tcp" ),
70+ "cloudstack_firewall.foo" , "rule.3832507136 .protocol" , "tcp" ),
7171 resource .TestCheckResourceAttr (
72- "cloudstack_firewall.foo" , "rule.716592205 .ports.1209010669" , "1000-2000" ),
72+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1209010669" , "1000-2000" ),
7373 resource .TestCheckResourceAttr (
74- "cloudstack_firewall.foo" , "rule.716592205 .ports.1889509032" , "80" ),
74+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1889509032" , "80" ),
7575 ),
7676 },
7777
@@ -80,33 +80,33 @@ func TestAccCloudStackFirewall_update(t *testing.T) {
8080 Check : resource .ComposeTestCheckFunc (
8181 testAccCheckCloudStackFirewallRulesExist ("cloudstack_firewall.foo" ),
8282 resource .TestCheckResourceAttr (
83- "cloudstack_firewall.foo" , "ipaddress " , CLOUDSTACK_PUBLIC_IPADDRESS ),
83+ "cloudstack_firewall.foo" , "ip_address " , CLOUDSTACK_PUBLIC_IPADDRESS ),
8484 resource .TestCheckResourceAttr (
8585 "cloudstack_firewall.foo" , "rule.#" , "3" ),
8686 resource .TestCheckResourceAttr (
87- "cloudstack_firewall.foo" , "rule.2207610982 .cidr_list.80081744" , "10.0.1.0/24" ),
87+ "cloudstack_firewall.foo" , "rule.2144925929 .cidr_list.80081744" , "10.0.1.0/24" ),
8888 resource .TestCheckResourceAttr (
89- "cloudstack_firewall.foo" , "rule.2207610982 .cidr_list.3482919157" , "10.0.0.0/24" ),
89+ "cloudstack_firewall.foo" , "rule.2144925929 .cidr_list.3482919157" , "10.0.0.0/24" ),
9090 resource .TestCheckResourceAttr (
91- "cloudstack_firewall.foo" , "rule.2207610982 .protocol" , "tcp" ),
91+ "cloudstack_firewall.foo" , "rule.2144925929 .protocol" , "tcp" ),
9292 resource .TestCheckResourceAttr (
93- "cloudstack_firewall.foo" , "rule.2207610982 .ports.32925333" , "8080" ),
93+ "cloudstack_firewall.foo" , "rule.2144925929 .ports.32925333" , "8080" ),
9494 resource .TestCheckResourceAttr (
95- "cloudstack_firewall.foo" , "rule.716592205.source_cidr " , "10.0.0.0/24" ),
95+ "cloudstack_firewall.foo" , "rule.3832507136.cidr_list.3482919157 " , "10.0.0.0/24" ),
9696 resource .TestCheckResourceAttr (
97- "cloudstack_firewall.foo" , "rule.716592205 .protocol" , "tcp" ),
97+ "cloudstack_firewall.foo" , "rule.3832507136 .protocol" , "tcp" ),
9898 resource .TestCheckResourceAttr (
99- "cloudstack_firewall.foo" , "rule.716592205 .ports.1209010669" , "1000-2000" ),
99+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1209010669" , "1000-2000" ),
100100 resource .TestCheckResourceAttr (
101- "cloudstack_firewall.foo" , "rule.716592205 .ports.1889509032" , "80" ),
101+ "cloudstack_firewall.foo" , "rule.3832507136 .ports.1889509032" , "80" ),
102102 resource .TestCheckResourceAttr (
103- "cloudstack_firewall.foo" , "rule.4449157.source_cidr " , "172.16.100.0/24" ),
103+ "cloudstack_firewall.foo" , "rule.302279047.cidr_list.2835005819 " , "172.16.100.0/24" ),
104104 resource .TestCheckResourceAttr (
105- "cloudstack_firewall.foo" , "rule.4449157 .protocol" , "tcp" ),
105+ "cloudstack_firewall.foo" , "rule.302279047 .protocol" , "tcp" ),
106106 resource .TestCheckResourceAttr (
107- "cloudstack_firewall.foo" , "rule.4449157 .ports.1889509032" , "80" ),
107+ "cloudstack_firewall.foo" , "rule.302279047 .ports.1889509032" , "80" ),
108108 resource .TestCheckResourceAttr (
109- "cloudstack_firewall.foo" , "rule.4449157 .ports.3638101695" , "443" ),
109+ "cloudstack_firewall.foo" , "rule.302279047 .ports.3638101695" , "443" ),
110110 ),
111111 },
112112 },
@@ -174,7 +174,7 @@ func testAccCheckCloudStackFirewallDestroy(s *terraform.State) error {
174174
175175var testAccCloudStackFirewall_basic = fmt .Sprintf (`
176176resource "cloudstack_firewall" "foo" {
177- ipaddress = "%s"
177+ ip_address = "%s"
178178
179179 rule {
180180 cidr_list = ["10.0.0.0/24"]
@@ -183,15 +183,15 @@ resource "cloudstack_firewall" "foo" {
183183 }
184184
185185 rule {
186- source_cidr = "10.0.0.0/24"
186+ cidr_list = [ "10.0.0.0/24"]
187187 protocol = "tcp"
188188 ports = ["80", "1000-2000"]
189189 }
190190}` , CLOUDSTACK_PUBLIC_IPADDRESS )
191191
192192var testAccCloudStackFirewall_update = fmt .Sprintf (`
193193resource "cloudstack_firewall" "foo" {
194- ipaddress = "%s"
194+ ip_address = "%s"
195195
196196 rule {
197197 cidr_list = ["10.0.0.0/24", "10.0.1.0/24"]
@@ -200,13 +200,13 @@ resource "cloudstack_firewall" "foo" {
200200 }
201201
202202 rule {
203- source_cidr = "10.0.0.0/24"
203+ cidr_list = [ "10.0.0.0/24"]
204204 protocol = "tcp"
205205 ports = ["80", "1000-2000"]
206206 }
207207
208208 rule {
209- source_cidr = "172.16.100.0/24"
209+ cidr_list = [ "172.16.100.0/24"]
210210 protocol = "tcp"
211211 ports = ["80", "443"]
212212 }
0 commit comments