Skip to content

Commit f40209f

Browse files
committed
add explicit name to vpc to identify them more easily
1 parent c0b01c3 commit f40209f

File tree

16 files changed

+157
-49
lines changed

16 files changed

+157
-49
lines changed

docs/guides/using-vpc-bastion-ssh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ variable "machine_count" {
3535
3636
# SCALEWAY VPC PRIVATE NETWORK
3737
resource scaleway_vpc "main" {
38-
region = "fr-par"
38+
region = "fr-par"
3939
}
4040
4141
resource scaleway_vpc_private_network "pn" {

internal/services/container/container_test.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,9 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
648648
Steps: []resource.TestStep{
649649
{
650650
Config: `
651-
resource scaleway_vpc main {}
651+
resource scaleway_vpc main {
652+
name = "TestAccContainer_PrivateNetwork"
653+
}
652654
653655
resource scaleway_vpc_private_network pn00 {
654656
name = "test-acc-container-pn-pn00"
@@ -679,7 +681,9 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
679681
},
680682
{
681683
Config: `
682-
resource scaleway_vpc main {}
684+
resource scaleway_vpc main {
685+
name = "TestAccContainer_PrivateNetwork"
686+
}
683687
684688
resource scaleway_vpc_private_network pn00 {
685689
name = "test-acc-container-pn-pn00"
@@ -729,7 +733,9 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
729733
},
730734
{
731735
Config: `
732-
resource scaleway_vpc main {}
736+
resource scaleway_vpc main {
737+
name = "TestAccContainer_PrivateNetwork"
738+
}
733739
734740
resource scaleway_vpc_private_network pn00 {
735741
name = "test-acc-container-pn-pn00"

internal/services/container/namespace_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,9 @@ func TestAccNamespace_VPCIntegration(t *testing.T) {
283283
Steps: []resource.TestStep{
284284
{
285285
Config: `
286-
resource scaleway_vpc main {}
286+
resource scaleway_vpc main {
287+
name = "TestAccNamespace_VPCIntegration"
288+
}
287289
288290
resource scaleway_vpc_private_network main {
289291
vpc_id = scaleway_vpc.main.id
@@ -304,7 +306,9 @@ func TestAccNamespace_VPCIntegration(t *testing.T) {
304306
},
305307
{
306308
Config: `
307-
resource scaleway_vpc main {}
309+
resource scaleway_vpc main {
310+
name = "TestAccNamespace_VPCIntegration"
311+
}
308312
309313
resource scaleway_vpc_private_network main {
310314
vpc_id = scaleway_vpc.main.id

internal/services/function/function_test.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
426426
Steps: []resource.TestStep{
427427
{
428428
Config: `
429-
resource scaleway_vpc main {}
429+
resource scaleway_vpc main {
430+
name = "TestAccFunction_PrivateNetwork"
431+
}
430432
431433
resource scaleway_vpc_private_network pn00 {
432434
name = "test-acc-function-pn-pn00"
@@ -461,7 +463,9 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
461463
},
462464
{
463465
Config: `
464-
resource scaleway_vpc main {}
466+
resource scaleway_vpc main {
467+
name = "TestAccFunction_PrivateNetwork"
468+
}
465469
466470
resource scaleway_vpc_private_network pn00 {
467471
name = "test-acc-function-pn-pn00"
@@ -521,7 +525,9 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
521525
},
522526
{
523527
Config: `
524-
resource scaleway_vpc main {}
528+
resource scaleway_vpc main {
529+
name = "TestAccFunction_PrivateNetwork"
530+
}
525531
526532
resource scaleway_vpc_private_network pn00 {
527533
name = "test-acc-function-pn-pn00"

internal/services/function/namespace_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ func TestAccFunctionNamespace_VPCIntegration(t *testing.T) {
197197
Steps: []resource.TestStep{
198198
{
199199
Config: `
200-
resource scaleway_vpc main {}
200+
resource scaleway_vpc main {
201+
name = "TestAccFunctionNamespace_VPCIntegration"
202+
}
201203
202204
resource scaleway_vpc_private_network main {
203205
vpc_id = scaleway_vpc.main.id
@@ -221,7 +223,9 @@ func TestAccFunctionNamespace_VPCIntegration(t *testing.T) {
221223
},
222224
{
223225
Config: `
224-
resource scaleway_vpc main {}
226+
resource scaleway_vpc main {
227+
name = "TestAccFunctionNamespace_VPCIntegration"
228+
}
225229
226230
resource scaleway_vpc_private_network main {
227231
vpc_id = scaleway_vpc.main.id

internal/services/instance/private_nic_test.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ func TestAccPrivateNIC_Basic(t *testing.T) {
2626
Steps: []resource.TestStep{
2727
{
2828
Config: `
29-
resource scaleway_vpc main {}
29+
resource scaleway_vpc main {
30+
name = "TestAccPrivateNIC_Basic"
31+
}
3032
3133
resource scaleway_vpc_private_network pn01 {
3234
name = "TestAccScalewayInstancePrivateNIC_Basic"
@@ -67,7 +69,9 @@ func TestAccPrivateNIC_Tags(t *testing.T) {
6769
Steps: []resource.TestStep{
6870
{
6971
Config: `
70-
resource scaleway_vpc main {}
72+
resource scaleway_vpc main {
73+
name = "TestAccPrivateNIC_Tags"
74+
}
7175
7276
resource scaleway_vpc_private_network pn01 {
7377
name = "TestAccScalewayInstancePrivateNIC_Tags"
@@ -94,7 +98,9 @@ func TestAccPrivateNIC_Tags(t *testing.T) {
9498
},
9599
{
96100
Config: `
97-
resource scaleway_vpc main {}
101+
resource scaleway_vpc main {
102+
name = "TestAccPrivateNIC_Tags"
103+
}
98104
99105
resource scaleway_vpc_private_network pn01 {
100106
name = "TestAccScalewayInstancePrivateNIC_Tags"
@@ -124,7 +130,9 @@ func TestAccPrivateNIC_Tags(t *testing.T) {
124130
},
125131
{
126132
Config: `
127-
resource scaleway_vpc main {}
133+
resource scaleway_vpc main {
134+
name = "TestAccPrivateNIC_Tags"
135+
}
128136
129137
resource scaleway_vpc_private_network pn01 {
130138
name = "TestAccScalewayInstancePrivateNIC_Tags"

internal/services/instance/server_test.go

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ func TestAccServer_PrivateNetwork(t *testing.T) {
11191119
{
11201120
Config: `
11211121
resource scaleway_vpc main {
1122+
name = "TestAccServer_PrivateNetwork"
11221123
region = "fr-par"
11231124
}
11241125
@@ -1151,7 +1152,10 @@ func TestAccServer_PrivateNetwork(t *testing.T) {
11511152
},
11521153
{
11531154
Config: `
1154-
resource scaleway_vpc main {}
1155+
resource scaleway_vpc main {
1156+
name = "TestAccServer_PrivateNetwork"
1157+
region = "fr-par"
1158+
}
11551159
11561160
resource scaleway_vpc_private_network pn01 {
11571161
name = "private_network_instance"
@@ -1180,7 +1184,10 @@ func TestAccServer_PrivateNetwork(t *testing.T) {
11801184
},
11811185
{
11821186
Config: `
1183-
resource scaleway_vpc main {}
1187+
resource scaleway_vpc main {
1188+
name = "TestAccServer_PrivateNetwork"
1189+
region = "fr-par"
1190+
}
11841191
11851192
resource scaleway_vpc_private_network pn01 {
11861193
name = "private_network_instance"
@@ -1213,7 +1220,10 @@ func TestAccServer_PrivateNetwork(t *testing.T) {
12131220
},
12141221
{
12151222
Config: `
1216-
resource scaleway_vpc main {}
1223+
resource scaleway_vpc main {
1224+
name = "TestAccServer_PrivateNetwork"
1225+
region = "fr-par"
1226+
}
12171227
12181228
resource scaleway_vpc_private_network pn01 {
12191229
name = "private_network_instance"
@@ -1257,7 +1267,10 @@ func TestAccServer_PrivateNetwork(t *testing.T) {
12571267
},
12581268
{
12591269
Config: `
1260-
resource scaleway_vpc main {}
1270+
resource scaleway_vpc main {
1271+
name = "TestAccServer_PrivateNetwork"
1272+
region = "fr-par"
1273+
}
12611274
12621275
resource scaleway_vpc_private_network pn01 {
12631276
name = "private_network_instance"
@@ -2000,7 +2013,9 @@ func TestAccServer_PrivateNetworkMissingPNIC(t *testing.T) {
20002013
Steps: []resource.TestStep{
20012014
{
20022015
Config: `
2003-
resource scaleway_vpc main {}
2016+
resource scaleway_vpc main {
2017+
name = "TestAccServer_PrivateNetworkMissingPNIC"
2018+
}
20042019
20052020
resource scaleway_vpc_private_network pn {
20062021
vpc_id = scaleway_vpc.main.id
@@ -2028,7 +2043,9 @@ func TestAccServer_PrivateNetworkMissingPNIC(t *testing.T) {
20282043
},
20292044
{
20302045
Config: `
2031-
resource scaleway_vpc main {}
2046+
resource scaleway_vpc main {
2047+
name = "TestAccServer_PrivateNetworkMissingPNIC"
2048+
}
20322049
20332050
resource scaleway_vpc_private_network pn {
20342051
vpc_id = scaleway_vpc.main.id
@@ -2065,7 +2082,9 @@ func TestAccServer_PrivateNetworkMissingPNIC(t *testing.T) {
20652082
},
20662083
{ // We import private nic as a separate resource to trigger its deletion.
20672084
Config: `
2068-
resource scaleway_vpc main {}
2085+
resource scaleway_vpc main {
2086+
name = "TestAccServer_PrivateNetworkMissingPNIC"
2087+
}
20692088
20702089
resource scaleway_vpc_private_network pn {
20712090
vpc_id = scaleway_vpc.main.id
@@ -2117,7 +2136,9 @@ func TestAccServer_PrivateNetworkMissingPNIC(t *testing.T) {
21172136
},
21182137
{
21192138
Config: `
2120-
resource scaleway_vpc main {}
2139+
resource scaleway_vpc main {
2140+
name = "TestAccServer_PrivateNetworkMissingPNIC"
2141+
}
21212142
21222143
resource scaleway_vpc_private_network pn {
21232144
vpc_id = scaleway_vpc.main.id
@@ -2146,7 +2167,9 @@ func TestAccServer_PrivateNetworkMissingPNIC(t *testing.T) {
21462167
},
21472168
{
21482169
Config: `
2149-
resource scaleway_vpc main {}
2170+
resource scaleway_vpc main {
2171+
name = "TestAccServer_PrivateNetworkMissingPNIC"
2172+
}
21502173
21512174
resource scaleway_vpc_private_network pn {
21522175
vpc_id = scaleway_vpc.main.id

internal/services/k8s/acl_test.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ func TestAccACL_Basic(t *testing.T) {
2525
Steps: []resource.TestStep{
2626
{
2727
Config: fmt.Sprintf(`
28-
resource "scaleway_vpc" "main" {}
28+
resource "scaleway_vpc" "main" {
29+
name = "TestAccACL_Basic"
30+
}
2931
3032
resource "scaleway_vpc_private_network" "acl_basic" {
3133
vpc_id = scaleway_vpc.main.id
@@ -60,7 +62,9 @@ func TestAccACL_Basic(t *testing.T) {
6062
},
6163
{
6264
Config: fmt.Sprintf(`
63-
resource "scaleway_vpc" "main" {}
65+
resource "scaleway_vpc" "main" {
66+
name = "TestAccACL_Basic"
67+
}
6468
6569
resource "scaleway_vpc_private_network" "acl_basic" {
6670
vpc_id = scaleway_vpc.main.id
@@ -103,7 +107,9 @@ func TestAccACL_Basic(t *testing.T) {
103107
},
104108
{
105109
Config: fmt.Sprintf(`
106-
resource "scaleway_vpc" "main" {}
110+
resource "scaleway_vpc" "main" {
111+
name = "TestAccACL_Basic"
112+
}
107113
108114
resource "scaleway_vpc_private_network" "acl_basic" {
109115
vpc_id = scaleway_vpc.main.id
@@ -147,7 +153,9 @@ func TestAccACL_Basic(t *testing.T) {
147153
},
148154
{
149155
Config: fmt.Sprintf(`
150-
resource "scaleway_vpc" "main" {}
156+
resource "scaleway_vpc" "main" {
157+
name = "TestAccACL_Basic"
158+
}
151159
152160
resource "scaleway_vpc_private_network" "acl_basic" {
153161
vpc_id = scaleway_vpc.main.id
@@ -174,7 +182,9 @@ func TestAccACL_Basic(t *testing.T) {
174182
},
175183
{
176184
Config: fmt.Sprintf(`
177-
resource "scaleway_vpc" "main" {}
185+
resource "scaleway_vpc" "main" {
186+
name = "TestAccACL_Basic"
187+
}
178188
179189
resource "scaleway_vpc_private_network" "acl_basic" {
180190
vpc_id = scaleway_vpc.main.id

internal/services/k8s/cluster_test.go

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,7 @@ func testAccCheckK8SClusterConfigAutoscaler(version string) string {
663663
return fmt.Sprintf(`
664664
resource "scaleway_vpc" "main" {
665665
region = "nl-ams"
666+
name = "testAccCheckK8SClusterConfigAutoscaler"
666667
}
667668
668669
resource "scaleway_vpc_private_network" "autoscaler" {
@@ -698,6 +699,7 @@ func testAccCheckK8SClusterConfigAutoscalerChange(version string) string {
698699
return fmt.Sprintf(`
699700
resource "scaleway_vpc" "main" {
700701
region = "nl-ams"
702+
name = "testAccCheckK8SClusterConfigAutoscalerChange"
701703
}
702704
703705
resource "scaleway_vpc_private_network" "autoscaler" {
@@ -729,7 +731,9 @@ resource "scaleway_k8s_cluster" "autoscaler" {
729731

730732
func testAccCheckK8SClusterConfigOIDC(version string) string {
731733
return fmt.Sprintf(`
732-
resource "scaleway_vpc" "main" {}
734+
resource "scaleway_vpc" "main" {
735+
name = "testAccCheckK8SClusterConfigOIDC"
736+
}
733737
734738
resource "scaleway_vpc_private_network" "oidc" {
735739
name = "test-oidc"
@@ -756,7 +760,9 @@ resource "scaleway_k8s_cluster" "oidc" {
756760

757761
func testAccCheckK8SClusterConfigOIDCChange(version string) string {
758762
return fmt.Sprintf(`
759-
resource "scaleway_vpc" "main" {}
763+
resource "scaleway_vpc" "main" {
764+
name = "testAccCheckK8SClusterConfigOIDCChange"
765+
}
760766
761767
resource "scaleway_vpc_private_network" "oidc" {
762768
name = "test-oidc"
@@ -783,7 +789,9 @@ resource "scaleway_k8s_cluster" "oidc" {
783789

784790
func testAccCheckK8SClusterAutoUpgrade(enable bool, day string, hour uint64, version string) string {
785791
return fmt.Sprintf(`
786-
resource "scaleway_vpc" "main" {}
792+
resource "scaleway_vpc" "main" {
793+
name = "testAccCheckK8SClusterAutoUpgrade"
794+
}
787795
788796
resource "scaleway_vpc_private_network" "auto_upgrade" {
789797
name = "test-auto-upgrade"
@@ -807,7 +815,9 @@ resource "scaleway_k8s_cluster" "auto_upgrade" {
807815

808816
func testAccCheckK8SClusterConfigPrivateNetworkLinked(version string) string {
809817
return fmt.Sprintf(`
810-
resource "scaleway_vpc" "main" {}
818+
resource "scaleway_vpc" "main" {
819+
name = "testAccCheckK8SClusterConfigPrivateNetworkLinked"
820+
}
811821
812822
resource "scaleway_vpc_private_network" "private_network" {
813823
name = "k8s-private-network"
@@ -827,7 +837,9 @@ resource "scaleway_k8s_cluster" "private_network" {
827837

828838
func testAccCheckK8SClusterConfigPrivateNetworkChange(version string) string {
829839
return fmt.Sprintf(`
830-
resource "scaleway_vpc" "main" {}
840+
resource "scaleway_vpc" "main" {
841+
name = "testAccCheckK8SClusterConfigPrivateNetworkChange"
842+
}
831843
832844
resource "scaleway_vpc_private_network" "private_network" {
833845
name = "k8s-private-network"

0 commit comments

Comments
 (0)