Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/guides/using-vpc-bastion-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ variable "machine_count" {
}

# SCALEWAY VPC PRIVATE NETWORK
resource scaleway_vpc "main" {
region = "fr-par"
}

resource scaleway_vpc_private_network "pn" {
name = "myprivatenetwork"
zone = "fr-par-1"
vpc_id = scaleway_vpc.main.id
}

# SCALEWAY VPC VIRTUAL MACHINES
Expand Down
19 changes: 19 additions & 0 deletions internal/services/container/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,11 +648,17 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
Steps: []resource.TestStep{
{
Config: `
resource scaleway_vpc main {
name = "TestAccContainer_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-container-pn-pn00"
vpc_id = scaleway_vpc.main.id
}
resource scaleway_vpc_private_network pn01 {
name = "test-acc-container-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_container_namespace main {
Expand All @@ -675,11 +681,17 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
},
{
Config: `
resource scaleway_vpc main {
name = "TestAccContainer_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-container-pn-pn00"
vpc_id = scaleway_vpc.main.id
}
resource scaleway_vpc_private_network pn01 {
name = "test-acc-container-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_container_namespace main {
Expand Down Expand Up @@ -721,11 +733,18 @@ func TestAccContainer_PrivateNetwork(t *testing.T) {
},
{
Config: `
resource scaleway_vpc main {
name = "TestAccContainer_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-container-pn-pn00"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_vpc_private_network pn01 {
name = "test-acc-container-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_container_namespace main {
Expand Down
16 changes: 14 additions & 2 deletions internal/services/container/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,13 @@ func TestAccNamespace_VPCIntegration(t *testing.T) {
Steps: []resource.TestStep{
{
Config: `
resource scaleway_vpc_private_network main {}
resource scaleway_vpc main {
name = "TestAccNamespace_VPCIntegration"
}

resource scaleway_vpc_private_network main {
vpc_id = scaleway_vpc.main.id
}

resource scaleway_container_namespace main {}

Expand All @@ -300,7 +306,13 @@ func TestAccNamespace_VPCIntegration(t *testing.T) {
},
{
Config: `
resource scaleway_vpc_private_network main {}
resource scaleway_vpc main {
name = "TestAccNamespace_VPCIntegration"
}

resource scaleway_vpc_private_network main {
vpc_id = scaleway_vpc.main.id
}

resource scaleway_container_namespace main {
activate_vpc_integration = true
Expand Down
2,039 changes: 1,240 additions & 799 deletions internal/services/container/testdata/container-private-network.cassette.yaml

Large diffs are not rendered by default.

1,121 changes: 732 additions & 389 deletions internal/services/container/testdata/namespace-vpc-integration.cassette.yaml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions internal/services/function/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,18 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
Steps: []resource.TestStep{
{
Config: `
resource scaleway_vpc main {
name = "TestAccFunction_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-function-pn-pn00"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_vpc_private_network pn01 {
name = "test-acc-function-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_function_namespace main {
Expand All @@ -456,11 +463,18 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
},
{
Config: `
resource scaleway_vpc main {
name = "TestAccFunction_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-function-pn-pn00"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_vpc_private_network pn01 {
name = "test-acc-function-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_function_namespace main {
Expand Down Expand Up @@ -511,11 +525,18 @@ func TestAccFunction_PrivateNetwork(t *testing.T) {
},
{
Config: `
resource scaleway_vpc main {
name = "TestAccFunction_PrivateNetwork"
}

resource scaleway_vpc_private_network pn00 {
name = "test-acc-function-pn-pn00"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_vpc_private_network pn01 {
name = "test-acc-function-pn-pn01"
vpc_id = scaleway_vpc.main.id
}

resource scaleway_function_namespace main {
Expand Down
16 changes: 14 additions & 2 deletions internal/services/function/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,13 @@ func TestAccFunctionNamespace_VPCIntegration(t *testing.T) {
Steps: []resource.TestStep{
{
Config: `
resource scaleway_vpc_private_network main {}
resource scaleway_vpc main {
name = "TestAccFunctionNamespace_VPCIntegration"
}

resource scaleway_vpc_private_network main {
vpc_id = scaleway_vpc.main.id
}

resource scaleway_function_namespace main {}

Expand All @@ -217,7 +223,13 @@ func TestAccFunctionNamespace_VPCIntegration(t *testing.T) {
},
{
Config: `
resource scaleway_vpc_private_network main {}
resource scaleway_vpc main {
name = "TestAccFunctionNamespace_VPCIntegration"
}

resource scaleway_vpc_private_network main {
vpc_id = scaleway_vpc.main.id
}

resource scaleway_function_namespace main {
activate_vpc_integration = true
Expand Down
Loading
Loading