Skip to content

Commit 06c6469

Browse files
authored
Merge branch 'master' into fix/mongodb_fix_test
2 parents d2e8991 + 94baa12 commit 06c6469

File tree

271 files changed

+82210
-65028
lines changed

Some content is hidden

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

271 files changed

+82210
-65028
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ jobs:
3030
with:
3131
go-version: 1.24.0
3232

33+
- name: Verify go.mod is tidy
34+
run: |
35+
go mod tidy
36+
git diff --exit-code
37+
3338
- name: Import GPG key
3439
id: import_gpg
3540
uses: crazy-max/ghaction-import-gpg@v6

.github/workflows/terrafmt.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Run terrafmt
2+
on:
3+
pull_request:
4+
push:
5+
merge_group:
6+
7+
jobs:
8+
terrafmt:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# Checkout should always be before setup-go to ensure caching is working
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version: 1.24.0
16+
- name: Run terrafmt on documentation
17+
run: go tool terrafmt fmt --verbose --check ./docs

.github/workflows/unit-tests.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
uses: hashicorp/setup-terraform@v3
2222
- name: Build binaries
2323
run: make build
24+
- name: Verify go.mod is tidy
25+
run: |
26+
go mod tidy
27+
git diff --exit-code
2428
- name: Run unit tests
2529
run: make test
2630
- name: Check with go vet

.golangci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ linters:
125125
linters:
126126
- stylecheck
127127
- gosec
128+
- path: internal/services/vpcgw
129+
linters:
130+
- staticcheck
128131

129132
issues:
130133
max-issues-per-linter: 0
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
subcategory: "Account"
3+
page_title: "Scaleway: scaleway_account_projects"
4+
---
5+
6+
# scaleway_account_projects
7+
8+
The `scaleway_account_projects` data source is used to list all Scaleway projects in an Organization.
9+
10+
Refer to the Organizations and Projects [documentation](https://www.scaleway.com/en/docs/organizations-and-projects/) and [API documentation](https://www.scaleway.com/en/developers/api/account/project-api/) for more information.
11+
12+
13+
## Retrieve a Scaleway Projects
14+
15+
The following commands allow you to:
16+
17+
- retrieve all Projects in an Organization
18+
19+
```hcl
20+
# Get all Projects in an Organization
21+
data scaleway_account_projects "all" {
22+
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
23+
}
24+
```
25+
26+
## Example Usage
27+
28+
### Deploy an SSH key in all your organization's projects
29+
30+
```hcl
31+
data scaleway_account_projects "all" {}
32+
33+
resource "scaleway_account_ssh_key" "main" {
34+
name = "main"
35+
public_key = local.public_key
36+
count = length(data.scaleway_account_projects.all.projects)
37+
project_id = data.scaleway_account_projects.all.projects[count.index].id
38+
}
39+
```
40+
41+
## Argument Reference
42+
43+
- `organization_id` - (Optional) The unique identifier of the Organization with which the Projects are associated.
44+
If no default `organization_id` is set, one must be set explicitly in this datasource
45+
46+
47+
## Attribute reference
48+
49+
The `scaleway_account_projects` data source exports the following attributes:
50+
51+
- `projects` - (Computed) A list of projects. Each project has the following attributes:
52+
- `id` - (Computed) The unique identifier of the project.
53+
- `name` - (Computed) The name of the project.
54+
- `organization_id` - (Computed) The unique identifier of the organization with which the project is associated.
55+
- `created_at` - (Computed) The date and time when the project was created.
56+
- `updated_at` - (Computed) The date and time when the project was updated.
57+
- `description` - (Computed) The description of the project.

docs/data-sources/account_ssh_key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following commands allow you to:
2020
```hcl
2121
# Get info by SSH key name
2222
data "scaleway_account_ssh_key" "my_key" {
23-
name = "my-key-name"
23+
name = "my-key-name"
2424
}
2525
2626
# Get info by SSH key id

docs/data-sources/baremetal_easy_partitioning.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,47 @@ This data source simplifies the process of generating valid partitioning configu
1313

1414
```hcl
1515
data "scaleway_easy_partitioning" "default" {
16-
offer_id = "11111111-1111-1111-1111-111111111111"
17-
os_id = "22222222-2222-2222-2222-222222222222"
18-
swap = true
19-
extra_partition = true
20-
ext_4_mountpoint = "/data"
16+
offer_id = "11111111-1111-1111-1111-111111111111"
17+
os_id = "22222222-2222-2222-2222-222222222222"
18+
swap = true
19+
extra_partition = true
20+
ext_4_mountpoint = "/data"
2121
}
2222
```
2323

2424
```hcl
2525
data "scaleway_baremetal_offer" "my_offer" {
26-
zone = "fr-par-1"
27-
name = "EM-B220E-NVME"
26+
zone = "fr-par-1"
27+
name = "EM-B220E-NVME"
2828
}
2929
3030
data "scaleway_baremetal_os" "my_os" {
31-
zone = "fr-par-1"
32-
name = "Ubuntu"
33-
version = "22.04 LTS (Jammy Jellyfish)"
31+
zone = "fr-par-1"
32+
name = "Ubuntu"
33+
version = "22.04 LTS (Jammy Jellyfish)"
3434
}
3535
3636
resource "scaleway_iam_ssh_key" "main" {
37-
name = "my-ssh-key"
38-
public_key = "my-ssh-key-public"
37+
name = "my-ssh-key"
38+
public_key = "my-ssh-key-public"
3939
}
4040
4141
data "scaleway_baremetal_easy_partitioning" "test" {
42-
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
43-
os_id = data.scaleway_baremetal_os.my_os.os_id
44-
swap = false
45-
ext_4_mountpoint = "/hello"
42+
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
43+
os_id = data.scaleway_baremetal_os.my_os.os_id
44+
swap = false
45+
ext_4_mountpoint = "/hello"
4646
}
4747
4848
resource "scaleway_baremetal_server" "base" {
49-
name = "my-baremetal-server"
50-
zone = "fr-par-1"
51-
description = "test a description"
52-
offer = data.scaleway_baremetal_offer.my_offer.offer_id
53-
os = data.scaleway_baremetal_os.my_os.os_id
54-
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
55-
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
56-
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
49+
name = "my-baremetal-server"
50+
zone = "fr-par-1"
51+
description = "test a description"
52+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
53+
os = data.scaleway_baremetal_os.my_os.os_id
54+
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
55+
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
56+
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
5757
}
5858
```
5959

@@ -75,4 +75,4 @@ In addition to all above arguments, the following attributes are exported:
7575

7676
- `id` — A composite identifier derived from offer_id and os_id.
7777

78-
- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
78+
- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.

docs/data-sources/baremetal_os.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can also use the [scaleway-cli](https://github.com/scaleway/scaleway-cli) wi
1515
```hcl
1616
# Get info by os name and version
1717
data "scaleway_baremetal_os" "by_name" {
18-
name = "Ubuntu"
18+
name = "Ubuntu"
1919
version = "20.04 LTS (Focal Fossa)"
2020
}
2121

docs/data-sources/baremetal_server.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ In addition to all above arguments, the following attributes are exported:
3535

3636
- `id` - The ID of the server.
3737

38+
The `scaleway_baremetal_server` data source exports certain attributes once the baremetal server information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. The exported attributes are those that come from the `scaleway_baremetal_server` [resource](../resources/baremetal_server.md)
39+
3840
~> **Important:** Baremetal servers' IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111`

docs/data-sources/billing_consumptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ In addition to all arguments above, the following attributes are exported:
3333
- `unit` - The unit of consumed quantity.
3434
- `billed_quantity` - The consumed quantity.
3535
- `project_id` - The project ID of the consumption.
36-
- `updated_at` - The last consumption update date.
36+
- `updated_at` - The last consumption update date.

0 commit comments

Comments
 (0)