@@ -13,6 +13,7 @@ import (
13
13
"github.com/stretchr/testify/assert"
14
14
15
15
"github.com/hetznercloud/hcloud-go/hcloud"
16
+
16
17
"github.com/hetznercloud/terraform-provider-hcloud/internal/firewall"
17
18
"github.com/hetznercloud/terraform-provider-hcloud/internal/image"
18
19
"github.com/hetznercloud/terraform-provider-hcloud/internal/network"
@@ -566,12 +567,12 @@ func TestServerResource_PrimaryIPNetworkTests(t *testing.T) {
566
567
sResWithNetAndPublicNet .SetRName (sResWithNetAndPublicNet .Name )
567
568
568
569
sResWithoutPublicNet := & server.RData {
569
- Name : sResWithNetAndPublicNet .Name ,
570
- Type : sResWithNetAndPublicNet .Type ,
571
- LocationName : sResWithNetAndPublicNet .LocationName ,
572
- Image : sResWithNetAndPublicNet .Image ,
573
- SSHKeys : sResWithNetAndPublicNet .SSHKeys ,
574
- Networks : sResWithNetAndPublicNet .Networks ,
570
+ Name : sResWithNetAndPublicNet .Name ,
571
+ Type : sResWithNetAndPublicNet .Type ,
572
+ Datacenter : sResWithNetAndPublicNet .Datacenter ,
573
+ Image : sResWithNetAndPublicNet .Image ,
574
+ SSHKeys : sResWithNetAndPublicNet .SSHKeys ,
575
+ Networks : sResWithNetAndPublicNet .Networks ,
575
576
PublicNet : map [string ]interface {}{
576
577
"ipv4_enabled" : false ,
577
578
"ipv6_enabled" : false ,
@@ -581,12 +582,12 @@ func TestServerResource_PrimaryIPNetworkTests(t *testing.T) {
581
582
sResWithoutPublicNet .SetRName (sResWithoutPublicNet .Name )
582
583
583
584
sResWithPrimaryIP := & server.RData {
584
- Name : sResWithoutPublicNet .Name ,
585
- Type : sResWithoutPublicNet .Type ,
586
- LocationName : sResWithoutPublicNet .LocationName ,
587
- Image : sResWithoutPublicNet .Image ,
588
- SSHKeys : sResWithoutPublicNet .SSHKeys ,
589
- Networks : sResWithoutPublicNet .Networks ,
585
+ Name : sResWithoutPublicNet .Name ,
586
+ Type : sResWithoutPublicNet .Type ,
587
+ Datacenter : sResWithoutPublicNet .Datacenter ,
588
+ Image : sResWithoutPublicNet .Image ,
589
+ SSHKeys : sResWithoutPublicNet .SSHKeys ,
590
+ Networks : sResWithoutPublicNet .Networks ,
590
591
PublicNet : map [string ]interface {}{
591
592
"ipv4_enabled" : true ,
592
593
"ipv4" : primaryIPv4Res .TFID () + ".id" ,
@@ -598,12 +599,12 @@ func TestServerResource_PrimaryIPNetworkTests(t *testing.T) {
598
599
sResWithPrimaryIP .SetRName (sResWithPrimaryIP .Name )
599
600
600
601
sResWithTwoPrimaryIPs := & server.RData {
601
- Name : sResWithPrimaryIP .Name ,
602
- Type : sResWithPrimaryIP .Type ,
603
- LocationName : sResWithPrimaryIP .LocationName ,
604
- Image : sResWithPrimaryIP .Image ,
605
- SSHKeys : sResWithPrimaryIP .SSHKeys ,
606
- Networks : sResWithPrimaryIP .Networks ,
602
+ Name : sResWithPrimaryIP .Name ,
603
+ Type : sResWithPrimaryIP .Type ,
604
+ Datacenter : sResWithPrimaryIP .Datacenter ,
605
+ Image : sResWithPrimaryIP .Image ,
606
+ SSHKeys : sResWithPrimaryIP .SSHKeys ,
607
+ Networks : sResWithPrimaryIP .Networks ,
607
608
PublicNet : map [string ]interface {}{
608
609
"ipv4_enabled" : true ,
609
610
"ipv4" : primaryIPv4Res .TFID () + ".id" ,
@@ -615,24 +616,24 @@ func TestServerResource_PrimaryIPNetworkTests(t *testing.T) {
615
616
sResWithTwoPrimaryIPs .SetRName (sResWithTwoPrimaryIPs .Name )
616
617
617
618
sResWithNoPublicNet := & server.RData {
618
- Name : sResWithTwoPrimaryIPs .Name ,
619
- Type : sResWithTwoPrimaryIPs .Type ,
620
- LocationName : sResWithTwoPrimaryIPs .LocationName ,
621
- Image : sResWithTwoPrimaryIPs .Image ,
622
- SSHKeys : sResWithTwoPrimaryIPs .SSHKeys ,
623
- Networks : sResWithTwoPrimaryIPs .Networks ,
624
- DependsOn : sResWithTwoPrimaryIPs .DependsOn ,
619
+ Name : sResWithTwoPrimaryIPs .Name ,
620
+ Type : sResWithTwoPrimaryIPs .Type ,
621
+ Datacenter : sResWithTwoPrimaryIPs .Datacenter ,
622
+ Image : sResWithTwoPrimaryIPs .Image ,
623
+ SSHKeys : sResWithTwoPrimaryIPs .SSHKeys ,
624
+ Networks : sResWithTwoPrimaryIPs .Networks ,
625
+ DependsOn : sResWithTwoPrimaryIPs .DependsOn ,
625
626
}
626
627
627
628
sResWithNoPublicNet .SetRName (sResWithNoPublicNet .Name )
628
629
629
630
sResWithOnlyIPv6 := & server.RData {
630
- Name : sResWithNoPublicNet .Name ,
631
- Type : sResWithNoPublicNet .Type ,
632
- LocationName : sResWithNoPublicNet .LocationName ,
633
- Image : sResWithNoPublicNet .Image ,
634
- SSHKeys : sResWithNoPublicNet .SSHKeys ,
635
- Networks : sResWithNoPublicNet .Networks ,
631
+ Name : sResWithNoPublicNet .Name ,
632
+ Type : sResWithNoPublicNet .Type ,
633
+ Datacenter : sResWithNoPublicNet .Datacenter ,
634
+ Image : sResWithNoPublicNet .Image ,
635
+ SSHKeys : sResWithNoPublicNet .SSHKeys ,
636
+ Networks : sResWithNoPublicNet .Networks ,
636
637
PublicNet : map [string ]interface {}{
637
638
"ipv4_enabled" : false ,
638
639
"ipv6_enabled" : true ,
@@ -644,12 +645,12 @@ func TestServerResource_PrimaryIPNetworkTests(t *testing.T) {
644
645
sResWithOnlyIPv6 .SetRName (sResWithOnlyIPv6 .Name )
645
646
646
647
sResWithOnlyIPv6AutoGenerated := & server.RData {
647
- Name : sResWithOnlyIPv6 .Name ,
648
- Type : sResWithOnlyIPv6 .Type ,
649
- LocationName : sResWithOnlyIPv6 .LocationName ,
650
- Image : sResWithOnlyIPv6 .Image ,
651
- SSHKeys : sResWithOnlyIPv6 .SSHKeys ,
652
- Networks : sResWithOnlyIPv6 .Networks ,
648
+ Name : sResWithOnlyIPv6 .Name ,
649
+ Type : sResWithOnlyIPv6 .Type ,
650
+ Datacenter : sResWithOnlyIPv6 .Datacenter ,
651
+ Image : sResWithOnlyIPv6 .Image ,
652
+ SSHKeys : sResWithOnlyIPv6 .SSHKeys ,
653
+ Networks : sResWithOnlyIPv6 .Networks ,
653
654
PublicNet : map [string ]interface {}{
654
655
"ipv4_enabled" : false ,
655
656
"ipv6_enabled" : true ,
0 commit comments