@@ -651,6 +651,47 @@ func TestAccScalewayLbLb_WithPrivateNetworksOnDHCPConfig(t *testing.T) {
651651 })
652652}
653653
654+ func TestAccScalewayLbLb_WithoutPNConfig (t * testing.T ) {
655+ tt := NewTestTools (t )
656+ defer tt .Cleanup ()
657+ resource .ParallelTest (t , resource.TestCase {
658+ PreCheck : func () { testAccPreCheck (t ) },
659+ ProviderFactories : tt .ProviderFactories ,
660+ CheckDestroy : testAccCheckScalewayLbDestroy (tt ),
661+ Steps : []resource.TestStep {
662+ {
663+ Config : `
664+ resource "scaleway_lb_ip" "ip01" {}
665+
666+ resource "scaleway_vpc_private_network" "pn" {
667+ name = "pn-with-lb-static"
668+ }
669+
670+ resource "scaleway_lb" "lb01" {
671+ ip_id = scaleway_lb_ip.ip01.id
672+ name = "test-lb-with-pn-static-cidr"
673+ type = "LB-S"
674+ private_network {
675+ private_network_id = scaleway_vpc_private_network.pn.id
676+ }
677+ }
678+ ` ,
679+ Check : resource .ComposeTestCheckFunc (
680+ testAccCheckScalewayLbExists (tt , "scaleway_lb.lb01" ),
681+ testAccCheckScalewayLbIPExists (tt , "scaleway_lb_ip.ip01" ),
682+ resource .TestCheckResourceAttrPair (
683+ "scaleway_lb.lb01" , "private_network.0.private_network_id" ,
684+ "scaleway_vpc_private_network.pn" , "id" ),
685+ resource .TestCheckResourceAttr ("scaleway_lb.lb01" ,
686+ "private_network.0.status" , lbSDK .PrivateNetworkStatusReady .String ()),
687+ resource .TestCheckResourceAttr ("scaleway_lb.lb01" ,
688+ "private_network.0.dhcp_config" , "true" ),
689+ ),
690+ },
691+ },
692+ })
693+ }
694+
654695func TestAccScalewayLbLb_DifferentLocalityIPID (t * testing.T ) {
655696 tt := NewTestTools (t )
656697 defer tt .Cleanup ()
0 commit comments