Skip to content

Commit 04fd61e

Browse files
authored
fix(vpc): change subnet to avoid overlaps (#2099)
1 parent 04ec2c0 commit 04fd61e

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

scaleway/resource_vpc_private_network_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ func TestAccScalewayVPCPrivateNetwork_OneSubnet(t *testing.T) {
237237
{
238238
Config: `resource scaleway_vpc_private_network test {
239239
ipv4_subnet {
240-
subnet = "172.16.32.0/22"
240+
subnet = "172.16.64.0/22"
241241
}
242242
}`,
243243
Check: resource.ComposeTestCheckFunc(
@@ -248,7 +248,7 @@ func TestAccScalewayVPCPrivateNetwork_OneSubnet(t *testing.T) {
248248
resource.TestCheckResourceAttr(
249249
"scaleway_vpc_private_network.test",
250250
"ipv4_subnet.0.subnet",
251-
"172.16.32.0/22",
251+
"172.16.64.0/22",
252252
),
253253
resource.TestCheckResourceAttrSet(
254254
"scaleway_vpc_private_network.test",

scaleway/testdata/vpc-private-network-one-subnet.cassette.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
version: 1
33
interactions:
44
- request:
5-
body: '{"name":"tf-pn-great-noyce","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","tags":null,"subnets":["172.16.32.0/22"],"vpc_id":null}'
5+
body: '{"name":"tf-pn-goofy-montalcini","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","tags":null,"subnets":["172.16.64.0/22"],"vpc_id":null}'
66
form: {}
77
headers:
88
Content-Type:
@@ -13,16 +13,16 @@ interactions:
1313
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks
1414
method: POST
1515
response:
16-
body: '{"created_at":"2023-07-11T17:19:13.981386Z","dhcp_enabled":false,"id":"4600e228-58e5-4b32-b39f-adde4646e014","name":"tf-pn-great-noyce","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-07-11T17:19:13.981386Z","id":"cf1c5091-75d5-4383-856b-869de6623083","subnet":"172.16.32.0/22","updated_at":"2023-07-11T17:19:13.981386Z"},{"created_at":"2023-07-11T17:19:13.981386Z","id":"3e1b90eb-4737-48a8-8ebf-a4d20a3f41c0","subnet":"fd46:78ab:30b8:9e87::/64","updated_at":"2023-07-11T17:19:13.981386Z"}],"tags":[],"updated_at":"2023-07-11T17:19:13.981386Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
16+
body: '{"created_at":"2023-08-18T11:35:26.505768Z","dhcp_enabled":true,"id":"cd1d372c-3eeb-47bf-bc8d-8de763fa1689","name":"tf-pn-goofy-montalcini","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-08-18T11:35:26.505768Z","id":"eed4a03d-ecaa-41c2-b729-1744d0b2b814","subnet":"172.16.64.0/22","updated_at":"2023-08-18T11:35:26.505768Z"},{"created_at":"2023-08-18T11:35:26.505768Z","id":"2ed90606-8915-4143-a55c-3cbf3de26925","subnet":"fd46:78ab:30b8:e02a::/64","updated_at":"2023-08-18T11:35:26.505768Z"}],"tags":[],"updated_at":"2023-08-18T11:35:26.505768Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
1717
headers:
1818
Content-Length:
19-
- "702"
19+
- "723"
2020
Content-Security-Policy:
2121
- default-src 'none'; frame-ancestors 'none'
2222
Content-Type:
2323
- application/json
2424
Date:
25-
- Tue, 11 Jul 2023 17:19:14 GMT
25+
- Fri, 18 Aug 2023 11:35:30 GMT
2626
Server:
2727
- Scaleway API-Gateway
2828
Strict-Transport-Security:
@@ -32,7 +32,7 @@ interactions:
3232
X-Frame-Options:
3333
- DENY
3434
X-Request-Id:
35-
- 2f2c9afe-2acf-4dc6-9bbe-7058a30bb5fd
35+
- 02ec798d-34df-48f4-8513-03c87008f004
3636
status: 200 OK
3737
code: 200
3838
duration: ""
@@ -43,19 +43,19 @@ interactions:
4343
User-Agent:
4444
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) terraform-provider/develop
4545
terraform/terraform-tests
46-
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/4600e228-58e5-4b32-b39f-adde4646e014
46+
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/cd1d372c-3eeb-47bf-bc8d-8de763fa1689
4747
method: GET
4848
response:
49-
body: '{"created_at":"2023-07-11T17:19:13.981386Z","dhcp_enabled":false,"id":"4600e228-58e5-4b32-b39f-adde4646e014","name":"tf-pn-great-noyce","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-07-11T17:19:13.981386Z","id":"cf1c5091-75d5-4383-856b-869de6623083","subnet":"172.16.32.0/22","updated_at":"2023-07-11T17:19:13.981386Z"},{"created_at":"2023-07-11T17:19:13.981386Z","id":"3e1b90eb-4737-48a8-8ebf-a4d20a3f41c0","subnet":"fd46:78ab:30b8:9e87::/64","updated_at":"2023-07-11T17:19:13.981386Z"}],"tags":[],"updated_at":"2023-07-11T17:19:13.981386Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
49+
body: '{"created_at":"2023-08-18T11:35:26.505768Z","dhcp_enabled":true,"id":"cd1d372c-3eeb-47bf-bc8d-8de763fa1689","name":"tf-pn-goofy-montalcini","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-08-18T11:35:26.505768Z","id":"eed4a03d-ecaa-41c2-b729-1744d0b2b814","subnet":"172.16.64.0/22","updated_at":"2023-08-18T11:35:26.505768Z"},{"created_at":"2023-08-18T11:35:26.505768Z","id":"2ed90606-8915-4143-a55c-3cbf3de26925","subnet":"fd46:78ab:30b8:e02a::/64","updated_at":"2023-08-18T11:35:26.505768Z"}],"tags":[],"updated_at":"2023-08-18T11:35:26.505768Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
5050
headers:
5151
Content-Length:
52-
- "702"
52+
- "723"
5353
Content-Security-Policy:
5454
- default-src 'none'; frame-ancestors 'none'
5555
Content-Type:
5656
- application/json
5757
Date:
58-
- Tue, 11 Jul 2023 17:19:14 GMT
58+
- Fri, 18 Aug 2023 11:35:30 GMT
5959
Server:
6060
- Scaleway API-Gateway
6161
Strict-Transport-Security:
@@ -65,7 +65,7 @@ interactions:
6565
X-Frame-Options:
6666
- DENY
6767
X-Request-Id:
68-
- 24374ec2-2ddb-424b-8404-0fcf85ffce96
68+
- 7785e172-3140-42d7-969c-48133f561265
6969
status: 200 OK
7070
code: 200
7171
duration: ""
@@ -76,19 +76,19 @@ interactions:
7676
User-Agent:
7777
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) terraform-provider/develop
7878
terraform/terraform-tests
79-
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/4600e228-58e5-4b32-b39f-adde4646e014
79+
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/cd1d372c-3eeb-47bf-bc8d-8de763fa1689
8080
method: GET
8181
response:
82-
body: '{"created_at":"2023-07-11T17:19:13.981386Z","dhcp_enabled":false,"id":"4600e228-58e5-4b32-b39f-adde4646e014","name":"tf-pn-great-noyce","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-07-11T17:19:13.981386Z","id":"cf1c5091-75d5-4383-856b-869de6623083","subnet":"172.16.32.0/22","updated_at":"2023-07-11T17:19:13.981386Z"},{"created_at":"2023-07-11T17:19:13.981386Z","id":"3e1b90eb-4737-48a8-8ebf-a4d20a3f41c0","subnet":"fd46:78ab:30b8:9e87::/64","updated_at":"2023-07-11T17:19:13.981386Z"}],"tags":[],"updated_at":"2023-07-11T17:19:13.981386Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
82+
body: '{"created_at":"2023-08-18T11:35:26.505768Z","dhcp_enabled":true,"id":"cd1d372c-3eeb-47bf-bc8d-8de763fa1689","name":"tf-pn-goofy-montalcini","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-08-18T11:35:26.505768Z","id":"eed4a03d-ecaa-41c2-b729-1744d0b2b814","subnet":"172.16.64.0/22","updated_at":"2023-08-18T11:35:26.505768Z"},{"created_at":"2023-08-18T11:35:26.505768Z","id":"2ed90606-8915-4143-a55c-3cbf3de26925","subnet":"fd46:78ab:30b8:e02a::/64","updated_at":"2023-08-18T11:35:26.505768Z"}],"tags":[],"updated_at":"2023-08-18T11:35:26.505768Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
8383
headers:
8484
Content-Length:
85-
- "702"
85+
- "723"
8686
Content-Security-Policy:
8787
- default-src 'none'; frame-ancestors 'none'
8888
Content-Type:
8989
- application/json
9090
Date:
91-
- Tue, 11 Jul 2023 17:19:14 GMT
91+
- Fri, 18 Aug 2023 11:35:31 GMT
9292
Server:
9393
- Scaleway API-Gateway
9494
Strict-Transport-Security:
@@ -98,7 +98,7 @@ interactions:
9898
X-Frame-Options:
9999
- DENY
100100
X-Request-Id:
101-
- 27a9273c-2d37-4cf1-9d42-8bd553ae826e
101+
- 42aff3c5-cccb-4094-956b-9e8abe7eb72b
102102
status: 200 OK
103103
code: 200
104104
duration: ""
@@ -109,19 +109,19 @@ interactions:
109109
User-Agent:
110110
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) terraform-provider/develop
111111
terraform/terraform-tests
112-
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/4600e228-58e5-4b32-b39f-adde4646e014
112+
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/cd1d372c-3eeb-47bf-bc8d-8de763fa1689
113113
method: GET
114114
response:
115-
body: '{"created_at":"2023-07-11T17:19:13.981386Z","dhcp_enabled":false,"id":"4600e228-58e5-4b32-b39f-adde4646e014","name":"tf-pn-great-noyce","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-07-11T17:19:13.981386Z","id":"cf1c5091-75d5-4383-856b-869de6623083","subnet":"172.16.32.0/22","updated_at":"2023-07-11T17:19:13.981386Z"},{"created_at":"2023-07-11T17:19:13.981386Z","id":"3e1b90eb-4737-48a8-8ebf-a4d20a3f41c0","subnet":"fd46:78ab:30b8:9e87::/64","updated_at":"2023-07-11T17:19:13.981386Z"}],"tags":[],"updated_at":"2023-07-11T17:19:13.981386Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
115+
body: '{"created_at":"2023-08-18T11:35:26.505768Z","dhcp_enabled":true,"id":"cd1d372c-3eeb-47bf-bc8d-8de763fa1689","name":"tf-pn-goofy-montalcini","organization_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","project_id":"564aa517-68b0-4fd7-8c8c-d21c4bcdcbd5","region":"fr-par","subnets":[{"created_at":"2023-08-18T11:35:26.505768Z","id":"eed4a03d-ecaa-41c2-b729-1744d0b2b814","subnet":"172.16.64.0/22","updated_at":"2023-08-18T11:35:26.505768Z"},{"created_at":"2023-08-18T11:35:26.505768Z","id":"2ed90606-8915-4143-a55c-3cbf3de26925","subnet":"fd46:78ab:30b8:e02a::/64","updated_at":"2023-08-18T11:35:26.505768Z"}],"tags":[],"updated_at":"2023-08-18T11:35:26.505768Z","vpc_id":"086a5171-f7ab-4667-a231-840a81203f19"}'
116116
headers:
117117
Content-Length:
118-
- "702"
118+
- "723"
119119
Content-Security-Policy:
120120
- default-src 'none'; frame-ancestors 'none'
121121
Content-Type:
122122
- application/json
123123
Date:
124-
- Tue, 11 Jul 2023 17:19:15 GMT
124+
- Fri, 18 Aug 2023 11:35:31 GMT
125125
Server:
126126
- Scaleway API-Gateway
127127
Strict-Transport-Security:
@@ -131,7 +131,7 @@ interactions:
131131
X-Frame-Options:
132132
- DENY
133133
X-Request-Id:
134-
- ef899a5e-9e33-4290-a7c6-000b403c66ba
134+
- 82530768-6d12-49b9-b8f9-da1b6f4ed43a
135135
status: 200 OK
136136
code: 200
137137
duration: ""
@@ -142,7 +142,7 @@ interactions:
142142
User-Agent:
143143
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) terraform-provider/develop
144144
terraform/terraform-tests
145-
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/4600e228-58e5-4b32-b39f-adde4646e014
145+
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/cd1d372c-3eeb-47bf-bc8d-8de763fa1689
146146
method: DELETE
147147
response:
148148
body: ""
@@ -152,7 +152,7 @@ interactions:
152152
Content-Type:
153153
- application/json
154154
Date:
155-
- Tue, 11 Jul 2023 17:19:16 GMT
155+
- Fri, 18 Aug 2023 11:35:33 GMT
156156
Server:
157157
- Scaleway API-Gateway
158158
Strict-Transport-Security:
@@ -162,7 +162,7 @@ interactions:
162162
X-Frame-Options:
163163
- DENY
164164
X-Request-Id:
165-
- 3b8932d0-eb57-435c-a68a-5107bb0d8078
165+
- 527a2734-1e39-4e54-946d-ff694fb943ea
166166
status: 204 No Content
167167
code: 204
168168
duration: ""
@@ -173,10 +173,10 @@ interactions:
173173
User-Agent:
174174
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.20.4; darwin; amd64) terraform-provider/develop
175175
terraform/terraform-tests
176-
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/4600e228-58e5-4b32-b39f-adde4646e014
176+
url: https://api.scaleway.com/vpc/v2/regions/fr-par/private-networks/cd1d372c-3eeb-47bf-bc8d-8de763fa1689
177177
method: GET
178178
response:
179-
body: '{"message":"resource is not found","resource":"private_network","resource_id":"4600e228-58e5-4b32-b39f-adde4646e014","type":"not_found"}'
179+
body: '{"message":"resource is not found","resource":"private_network","resource_id":"cd1d372c-3eeb-47bf-bc8d-8de763fa1689","type":"not_found"}'
180180
headers:
181181
Content-Length:
182182
- "136"
@@ -185,7 +185,7 @@ interactions:
185185
Content-Type:
186186
- application/json
187187
Date:
188-
- Tue, 11 Jul 2023 17:19:16 GMT
188+
- Fri, 18 Aug 2023 11:35:33 GMT
189189
Server:
190190
- Scaleway API-Gateway
191191
Strict-Transport-Security:
@@ -195,7 +195,7 @@ interactions:
195195
X-Frame-Options:
196196
- DENY
197197
X-Request-Id:
198-
- 83a50fb3-9cd5-4db9-adeb-4c37977d2dbd
198+
- db8a64e0-880c-4dde-8e3f-0f62470ab8c1
199199
status: 404 Not Found
200200
code: 404
201201
duration: ""

0 commit comments

Comments
 (0)