Skip to content

Commit f6bfc75

Browse files
authored
Merge branch 'master' into alert-autofix-15
2 parents 623a6fd + 52bd7bc commit f6bfc75

File tree

351 files changed

+8803
-1489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+8803
-1489
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ jobs:
6565
go-version: ${{ env.GO_VERSION }}
6666
- uses: hashicorp/setup-terraform@v3
6767
- run: go tool tfplugindocs validate
68+
- run: go tool tfplugindocs generate

.github/workflows/tfproviderlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
run: go install github.com/bflad/tfproviderlint/cmd/tfproviderlint
2222
- name: Run tfproviderlint
2323
run: make tfproviderlint
24+
- name: Run tfproviderlintx
25+
run: make tfproviderlintx
2426
tfproviderdocs:
2527
runs-on: ubuntu-latest
2628
steps:

.golangci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ linters:
112112
- varnamelen # checks that the length of a variable's name matches its scope [fast: false, auto-fix: false]
113113

114114
settings:
115+
depguard:
116+
rules:
117+
testing:
118+
files:
119+
- "**/*_test.go"
120+
deny:
121+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
122+
desc: use github.com/hashicorp/terraform-plugin-testing/helper/acctest
123+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
124+
desc: use github.com/hashicorp/terraform-plugin-testing/helper/resource
125+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
126+
desc: use github.com/hashicorp/terraform-plugin-testing/terraform
115127
govet:
116128
disable-all: true
117129
enable:

GNUmakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,6 @@ tfproviderlint:
6060

6161
tfproviderdocs:
6262
go tool tfproviderdocs check -provider-name scaleway -enable-contents-check
63+
64+
tfproviderlintx:
65+
go tool tfproviderlintx -XR001=false -XS002=false ./...

cmd/tftemplate/datasource_test.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package {{.API}}_test
44
import (
55
"testing"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
)
99

1010
func TestAccDataSource{{.Resource}}_Basic(t *testing.T) {

cmd/tftemplate/resource_test.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"testing"
77

8-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1010
"github.com/scaleway/scaleway-sdk-go/scw"
1111
)
1212

cmd/tftemplate/sweep.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"testing"
77

8-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1010
"github.com/scaleway/scaleway-sdk-go/scw"
1111
)
1212

cmd/tftemplate/sweep_test.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package {{.API}}_test
44
import (
55
"fmt"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
)
99

1010
func init() {

docs/resources/instance_server.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,13 @@ In addition to all arguments above, the following attributes are exported:
295295
- `private_ip` - The Scaleway internal IP address of the server (Deprecated use [ipam_ip datasource](../data-sources/ipam_ip.md#instance-private-network-ip) instead).
296296
- `public_ip` - The public IP address of the server (Deprecated use `public_ips` instead).
297297
- `public_ips` - The list of public IPs of the server.
298-
- `id` - The ID of the IP
299-
- `address` - The address of the IP
298+
- `id` - The ID of the IP.
299+
- `address` - The address of the IP.
300+
- `gateway` - The IP of the Gateway associated with the IP.
301+
- `netmask` - The CIDR netmask of the IP.
302+
- `family` - The IP address' family.
303+
- `dynamic` - Whether the IP is dynamic.
304+
- `provisioning_mode` - The provisioning mode of the IP
300305
- `ipv6_address` - The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true )
301306
Deprecated: Please use a scaleway_instance_ip with a `routed_ipv6` type.
302307
- `ipv6_gateway` - The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )

docs/resources/instance_snapshot.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ resource "scaleway_instance_server" "main" {
4040
4141
resource "scaleway_instance_snapshot" "main" {
4242
volume_id = scaleway_instance_volume.main.id
43-
type = "unified"
4443
depends_on = [scaleway_instance_server.main]
4544
}
4645
```
@@ -59,7 +58,6 @@ resource "scaleway_object" "qcow" {
5958
}
6059
6160
resource "scaleway_instance_snapshot" "snapshot" {
62-
type = "unified"
6361
import {
6462
bucket = scaleway_object.qcow.bucket
6563
key = scaleway_object.qcow.key
@@ -72,11 +70,12 @@ resource "scaleway_instance_snapshot" "snapshot" {
7270
The following arguments are supported:
7371

7472
- `volume_id` - (Optional) The ID of the volume to take a snapshot from.
75-
- `type` - (Optional) The snapshot's volume type. The possible values are: `l_ssd` (Local SSD) and `unified`.
73+
- `type` - (Default to `l_ssd`) The snapshot's volume type. The possible values are: `l_ssd` (Local SSD).
7674
Updates to this field will recreate a new resource.
7775

7876
~> **Important:** Snapshots of volumes with type `b_ssd` (Block SSD) are deprecated and cannot be managed using the `scaleway_instance_snapshot` resource anymore. Please use the `scaleway_block_snapshot` resource instead.
7977
If you want to migrate existing snapshots, you can visit [this page](https://www.scaleway.com/en/docs/instances/how-to/migrate-volumes-snapshots-to-sbs/) for more information.
78+
~> **Important:** Snapshots of volumes with type `unified` (can be used with both Block and Local SSD) are deprecated since the migration to SBS.
8079

8180
- `name` - (Optional) The name of the snapshot. If not provided it will be randomly generated.
8281
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which
@@ -88,8 +87,6 @@ If you want to migrate existing snapshots, you can visit [this page](https://www
8887
- `bucket` - Bucket name containing [qcow2](https://en.wikipedia.org/wiki/Qcow) to import
8988
- `key` - Key of the object to import
9089

91-
-> **Note:** The type `unified` could be instantiated on both `l_ssd` and `b_ssd` volumes.
92-
9390
## Attributes Reference
9491

9592
In addition to all arguments above, the following attributes are exported:

0 commit comments

Comments
 (0)