@@ -286,6 +286,7 @@ var testConfigNetworkVarsMax = config.Variables{
286286 "label" : config .StringVariable ("label" ),
287287 "organization_id" : config .StringVariable (testutil .OrganizationId ),
288288 "service_account_mail" : config .StringVariable (testutil .TestProjectServiceAccountEmail ),
289+ "dhcp" : config .BoolVariable (true ),
289290}
290291
291292var testConfigNetworkVarsMaxUpdated = func () config.Variables {
@@ -295,6 +296,7 @@ var testConfigNetworkVarsMaxUpdated = func() config.Variables {
295296 updatedConfig ["ipv4_gateway" ] = config .StringVariable ("" )
296297 updatedConfig ["ipv4_nameserver_0" ] = config .StringVariable ("10.2.2.10" )
297298 updatedConfig ["label" ] = config .StringVariable ("updated" )
299+ updatedConfig ["dhcp" ] = config .BoolVariable (false )
298300 return updatedConfig
299301}()
300302
@@ -656,6 +658,7 @@ func TestAccNetworkMin(t *testing.T) {
656658 resource .TestCheckResourceAttrSet ("stackit_network.network" , "public_ip" ),
657659 resource .TestCheckResourceAttrSet ("stackit_network.network" , "region" ),
658660 resource .TestCheckNoResourceAttr ("stackit_network.network" , "routing_table_id" ),
661+ resource .TestCheckResourceAttr ("stackit_network.network" , "dhcp" , "true" ),
659662 ),
660663 },
661664 // Data source
@@ -682,6 +685,7 @@ func TestAccNetworkMin(t *testing.T) {
682685 resource .TestCheckResourceAttrSet ("data.stackit_network.network" , "public_ip" ),
683686 resource .TestCheckResourceAttrSet ("data.stackit_network.network" , "region" ),
684687 resource .TestCheckNoResourceAttr ("data.stackit_network.network" , "routing_table_id" ),
688+ resource .TestCheckResourceAttr ("stackit_network.network" , "dhcp" , "true" ),
685689 ),
686690 },
687691
@@ -710,6 +714,7 @@ func TestAccNetworkMin(t *testing.T) {
710714 resource .TestCheckResourceAttrSet ("stackit_network.network" , "public_ip" ),
711715 resource .TestCheckResourceAttrSet ("stackit_network.network" , "region" ),
712716 resource .TestCheckNoResourceAttr ("stackit_network.network" , "routing_table_id" ),
717+ resource .TestCheckResourceAttr ("stackit_network.network" , "dhcp" , "true" ),
713718 ),
714719 },
715720 // Update
@@ -725,6 +730,7 @@ func TestAccNetworkMin(t *testing.T) {
725730 resource .TestCheckResourceAttrSet ("stackit_network.network" , "public_ip" ),
726731 resource .TestCheckResourceAttrSet ("stackit_network.network" , "region" ),
727732 resource .TestCheckNoResourceAttr ("stackit_network.network" , "routing_table_id" ),
733+ resource .TestCheckResourceAttr ("stackit_network.network" , "dhcp" , "true" ),
728734 ),
729735 },
730736 // Deletion is done by the framework implicitly
@@ -762,6 +768,7 @@ func TestAccNetworkMax(t *testing.T) {
762768 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "routed" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["routed" ])),
763769 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "labels.acc-test" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["label" ])),
764770 resource .TestCheckResourceAttrSet ("stackit_network.network_prefix" , "public_ip" ),
771+ resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "dhcp" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["dhcp" ])),
765772
766773 // Network with prefix_length
767774 resource .TestCheckResourceAttrSet ("stackit_network.network_prefix_length" , "network_id" ),
@@ -848,6 +855,7 @@ func TestAccNetworkMax(t *testing.T) {
848855 resource .TestCheckResourceAttrSet ("data.stackit_network.network_prefix" , "ipv6_prefixes.#" ),
849856 resource .TestCheckResourceAttr ("data.stackit_network.network_prefix" , "routed" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["routed" ])),
850857 resource .TestCheckResourceAttr ("data.stackit_network.network_prefix" , "labels.acc-test" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["label" ])),
858+ resource .TestCheckResourceAttr ("data.stackit_network.network_prefix" , "dhcp" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["dhcp" ])),
851859
852860 // Network with prefix_length
853861 resource .TestCheckResourceAttrSet ("data.stackit_network.network_prefix_length" , "network_id" ),
@@ -931,6 +939,7 @@ func TestAccNetworkMax(t *testing.T) {
931939 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "ipv4_prefixes.#" , "1" ),
932940 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "ipv4_prefixes.0" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["ipv4_prefix" ])),
933941 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "routed" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["routed" ])),
942+ resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "dhcp" , testutil .ConvertConfigVariable (testConfigNetworkVarsMax ["dhcp" ])),
934943 ),
935944 },
936945 {
@@ -998,6 +1007,7 @@ func TestAccNetworkMax(t *testing.T) {
9981007 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "routed" , testutil .ConvertConfigVariable (testConfigNetworkVarsMaxUpdated ["routed" ])),
9991008 resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "labels.acc-test" , testutil .ConvertConfigVariable (testConfigNetworkVarsMaxUpdated ["label" ])),
10001009 resource .TestCheckResourceAttrSet ("stackit_network.network_prefix" , "public_ip" ),
1010+ resource .TestCheckResourceAttr ("stackit_network.network_prefix" , "dhcp" , testutil .ConvertConfigVariable (testConfigNetworkVarsMaxUpdated ["dhcp" ])),
10011011
10021012 resource .TestCheckResourceAttrSet ("stackit_network.network_prefix_length" , "network_id" ),
10031013 resource .TestCheckResourceAttrPair (
0 commit comments