@@ -112,6 +112,8 @@ func TestAccCloudStackLoadBalancerRule_forceNew(t *testing.T) {
112112 "cloudstack_loadbalancer_rule.foo" , "public_port" , "80" ),
113113 resource .TestCheckResourceAttr (
114114 "cloudstack_loadbalancer_rule.foo" , "private_port" , "80" ),
115+ resource .TestCheckResourceAttr (
116+ "cloudstack_loadbalancer_rule.foo" , "cidrlist.0" , "10.0.0.0/8" ),
115117 ),
116118 },
117119
@@ -129,6 +131,8 @@ func TestAccCloudStackLoadBalancerRule_forceNew(t *testing.T) {
129131 "cloudstack_loadbalancer_rule.foo" , "private_port" , "443" ),
130132 resource .TestCheckResourceAttr (
131133 "cloudstack_loadbalancer_rule.foo" , "protocol" , "tcp-proxy" ),
134+ resource .TestCheckResourceAttr (
135+ "cloudstack_loadbalancer_rule.foo" , "cidrlist.0" , "20.0.0.0/8" ),
132136 ),
133137 },
134138 },
@@ -177,6 +181,8 @@ func TestAccCloudStackLoadBalancerRule_vpcUpdate(t *testing.T) {
177181 "cloudstack_loadbalancer_rule.foo" , "public_port" , "80" ),
178182 resource .TestCheckResourceAttr (
179183 "cloudstack_loadbalancer_rule.foo" , "private_port" , "80" ),
184+ resource .TestCheckResourceAttr (
185+ "cloudstack_loadbalancer_rule.foo" , "cidrlist.0" , "10.0.0.0/8" ),
180186 ),
181187 },
182188
@@ -192,6 +198,10 @@ func TestAccCloudStackLoadBalancerRule_vpcUpdate(t *testing.T) {
192198 "cloudstack_loadbalancer_rule.foo" , "public_port" , "443" ),
193199 resource .TestCheckResourceAttr (
194200 "cloudstack_loadbalancer_rule.foo" , "private_port" , "443" ),
201+ resource .TestCheckResourceAttr (
202+ "cloudstack_loadbalancer_rule.foo" , "cidrlist.0" , "20.0.0.0/8" ),
203+ resource .TestCheckResourceAttr (
204+ "cloudstack_loadbalancer_rule.foo" , "cidrlist.1" , "30.0.0.0/8" ),
195205 ),
196206 },
197207 },
@@ -290,6 +300,7 @@ resource "cloudstack_loadbalancer_rule" "foo" {
290300 public_port = 80
291301 private_port = 80
292302 member_ids = [cloudstack_instance.foobar1.id]
303+ cidrlist = ["10.0.0.0/8"]
293304}`
294305
295306const testAccCloudStackLoadBalancerRule_update = `
@@ -323,6 +334,7 @@ resource "cloudstack_loadbalancer_rule" "foo" {
323334 public_port = 80
324335 private_port = 80
325336 member_ids = [cloudstack_instance.foobar1.id]
337+ cidrlist = ["10.0.0.0/8"]
326338}`
327339
328340const testAccCloudStackLoadBalancerRule_forcenew = `
@@ -357,6 +369,7 @@ resource "cloudstack_loadbalancer_rule" "foo" {
357369 private_port = 443
358370 protocol = "tcp-proxy"
359371 member_ids = [cloudstack_instance.foobar1.id]
372+ cidrlist = ["20.0.0.0/8"]
360373}`
361374
362375const testAccCloudStackLoadBalancerRule_vpc = `
@@ -399,6 +412,7 @@ resource "cloudstack_loadbalancer_rule" "foo" {
399412 public_port = 80
400413 private_port = 80
401414 member_ids = [cloudstack_instance.foobar1.id]
415+ cidrlist = ["10.0.0.0/8"]
402416}`
403417
404418const testAccCloudStackLoadBalancerRule_vpc_update = `
@@ -451,4 +465,5 @@ resource "cloudstack_loadbalancer_rule" "foo" {
451465 public_port = 443
452466 private_port = 443
453467 member_ids = [cloudstack_instance.foobar1.id, cloudstack_instance.foobar2.id]
468+ cidrlist = ["20.0.0.0/8"]
454469}`
0 commit comments