Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2b263a4
feat(cockpit): delete cockpit plan data source
jremy42 Apr 30, 2025
c03d9c9
fix build
jremy42 Apr 30, 2025
ff2e8ab
fix(baremetal): compute mapping_id in private_network server (#3056)
Laure-di Apr 30, 2025
1c1267d
docs(cockpit): deprecated message for cockpit plan (#3057)
jremy42 Apr 30, 2025
502d42d
docs(mnq): remove permission restriction note (#3058)
jremy42 Apr 30, 2025
db348aa
tests(edge-services): include PipelineID in all stage ListRequests (#…
yfodil May 2, 2025
5b547b5
chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sns (#3065)
dependabot[bot] May 2, 2025
0d1ca7c
chore(deps): bump github.com/nats-io/jwt/v2 from 2.7.3 to 2.7.4 (#3063)
dependabot[bot] May 2, 2025
9397e29
chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#3061)
dependabot[bot] May 2, 2025
f968f48
fix(instance): EoS warning only displays the 5 most relevant types (#…
Mia-Cross May 2, 2025
836f2e9
chore(deps): bump github.com/hashicorp/aws-sdk-go-base/v2 (#3062)
dependabot[bot] May 2, 2025
5dc62a3
chore(deps): bump github.com/aws/aws-sdk-go-v2/service/sqs (#3064)
dependabot[bot] May 2, 2025
7b6739e
tests(ipam): replace deprecated rdb volume type (#3079)
yfodil May 7, 2025
8bad588
feat(lb) add support for path-begin route matching (#3082)
yfodil May 13, 2025
ab97da2
feat(baremetal): read private ips (#3071)
Mia-Cross May 13, 2025
ef5605b
feat(lb): read private ips (#3073)
Mia-Cross May 13, 2025
6de4b1d
feat(rdb): read instance's private IPs (#3075)
Mia-Cross May 13, 2025
96baad5
feat(redis): read cluster's private IPs (#3076)
Mia-Cross May 13, 2025
601ac65
feat(vpcgw): read gateway network's private IPs (#3077)
Mia-Cross May 13, 2025
00bfb9c
feat(instance): read private IPs (#3074)
Mia-Cross May 14, 2025
80adba4
docs(baremetal): update partitionSchema to correct format (#3083)
Laure-di May 15, 2025
f728ea2
chore: add support for terrafmt (#3085)
remyleone May 15, 2025
feeea4c
feat(k8s): read pool's private ips (#3072)
Mia-Cross May 15, 2025
72f6d0c
feat(inference): migration v1 and support BYOM (#3048)
Laure-di May 15, 2025
5ce5647
ci: add go mod tidy verification step to release workflow (#3087)
yfodil May 16, 2025
d6bb258
doc(container): fix healthcheck example (#3086)
Mia-Cross May 16, 2025
ba1c03f
feat(project): add the projects datasource (#3084)
Gnoale May 16, 2025
7f24aae
chore: go mod tidy (#3088)
remyleone May 16, 2025
fa21419
chore: add support for testing that go.mod is tidy (#3089)
remyleone May 16, 2025
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 .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ jobs:
with:
go-version: 1.24.0

- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/terrafmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Run terrafmt
on:
pull_request:
push:
merge_group:

jobs:
terrafmt:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.24.0
- name: Run terrafmt on documentation
run: go tool terrafmt fmt --verbose --check ./docs
4 changes: 4 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
uses: hashicorp/setup-terraform@v3
- name: Build binaries
run: make build
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code
- name: Run unit tests
run: make test
- name: Check with go vet
Expand Down
57 changes: 57 additions & 0 deletions docs/data-sources/account_projects.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
subcategory: "Account"
page_title: "Scaleway: scaleway_account_projects"
---

# scaleway_account_projects

The `scaleway_account_projects` data source is used to list all Scaleway projects in an Organization.

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.


## Retrieve a Scaleway Projects

The following commands allow you to:

- retrieve all Projects in an Organization

```hcl
# Get all Projects in an Organization
data scaleway_account_projects "all" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```

## Example Usage

### Deploy an SSH key in all your organization's projects

```hcl
data scaleway_account_projects "all" {}

resource "scaleway_account_ssh_key" "main" {
name = "main"
public_key = local.public_key
count = length(data.scaleway_account_projects.all.projects)
project_id = data.scaleway_account_projects.all.projects[count.index].id
}
```

## Argument Reference

- `organization_id` - (Optional) The unique identifier of the Organization with which the Projects are associated.
If no default `organization_id` is set, one must be set explicitly in this datasource


## Attribute reference

The `scaleway_account_projects` data source exports the following attributes:

- `projects` - (Computed) A list of projects. Each project has the following attributes:
- `id` - (Computed) The unique identifier of the project.
- `name` - (Computed) The name of the project.
- `organization_id` - (Computed) The unique identifier of the organization with which the project is associated.
- `created_at` - (Computed) The date and time when the project was created.
- `updated_at` - (Computed) The date and time when the project was updated.
- `description` - (Computed) The description of the project.
2 changes: 1 addition & 1 deletion docs/data-sources/account_ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following commands allow you to:
```hcl
# Get info by SSH key name
data "scaleway_account_ssh_key" "my_key" {
name = "my-key-name"
name = "my-key-name"
}

# Get info by SSH key id
Expand Down
50 changes: 25 additions & 25 deletions docs/data-sources/baremetal_easy_partitioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,47 @@ This data source simplifies the process of generating valid partitioning configu

```hcl
data "scaleway_easy_partitioning" "default" {
offer_id = "11111111-1111-1111-1111-111111111111"
os_id = "22222222-2222-2222-2222-222222222222"
swap = true
extra_partition = true
ext_4_mountpoint = "/data"
offer_id = "11111111-1111-1111-1111-111111111111"
os_id = "22222222-2222-2222-2222-222222222222"
swap = true
extra_partition = true
ext_4_mountpoint = "/data"
}
```

```hcl
data "scaleway_baremetal_offer" "my_offer" {
zone = "fr-par-1"
name = "EM-B220E-NVME"
zone = "fr-par-1"
name = "EM-B220E-NVME"
}

data "scaleway_baremetal_os" "my_os" {
zone = "fr-par-1"
name = "Ubuntu"
version = "22.04 LTS (Jammy Jellyfish)"
zone = "fr-par-1"
name = "Ubuntu"
version = "22.04 LTS (Jammy Jellyfish)"
}

resource "scaleway_iam_ssh_key" "main" {
name = "my-ssh-key"
public_key = "my-ssh-key-public"
name = "my-ssh-key"
public_key = "my-ssh-key-public"
}

data "scaleway_baremetal_easy_partitioning" "test" {
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
os_id = data.scaleway_baremetal_os.my_os.os_id
swap = false
ext_4_mountpoint = "/hello"
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
os_id = data.scaleway_baremetal_os.my_os.os_id
swap = false
ext_4_mountpoint = "/hello"
}

resource "scaleway_baremetal_server" "base" {
name = "my-baremetal-server"
zone = "fr-par-1"
description = "test a description"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
os = data.scaleway_baremetal_os.my_os.os_id
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
name = "my-baremetal-server"
zone = "fr-par-1"
description = "test a description"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
os = data.scaleway_baremetal_os.my_os.os_id
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
}
```

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

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

- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
2 changes: 1 addition & 1 deletion docs/data-sources/baremetal_os.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can also use the [scaleway-cli](https://github.com/scaleway/scaleway-cli) wi
```hcl
# Get info by os name and version
data "scaleway_baremetal_os" "by_name" {
name = "Ubuntu"
name = "Ubuntu"
version = "20.04 LTS (Focal Fossa)"
}

Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/baremetal_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ In addition to all above arguments, the following attributes are exported:

- `id` - The ID of the server.

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)

~> **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`
2 changes: 1 addition & 1 deletion docs/data-sources/billing_consumptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ In addition to all arguments above, the following attributes are exported:
- `unit` - The unit of consumed quantity.
- `billed_quantity` - The consumed quantity.
- `project_id` - The project ID of the consumption.
- `updated_at` - The last consumption update date.
- `updated_at` - The last consumption update date.
2 changes: 1 addition & 1 deletion docs/data-sources/block_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data "scaleway_block_snapshot" "my_snapshot" {

// Get info by snapshot name and volume id
data "scaleway_block_snapshot" "my_snapshot" {
name = "my-name"
name = "my-name"
volume_id = "11111111-1111-1111-1111-111111111111"
}

Expand Down
31 changes: 0 additions & 31 deletions docs/data-sources/cockpit_plan.md

This file was deleted.

8 changes: 4 additions & 4 deletions docs/data-sources/cockpit_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following example retrieves a Cockpit data source by its unique ID.

```terraform
data "scaleway_cockpit_source" "example" {
id = "fr-par/11111111-1111-1111-1111-111111111111"
id = "fr-par/11111111-1111-1111-1111-111111111111"
}
```

Expand All @@ -27,9 +27,9 @@ You can also retrieve a data source by specifying filtering criteria such as `na

```terraform
data "scaleway_cockpit_source" "filtered" {
project_id = "11111111-1111-1111-1111-111111111111"
region = "fr-par"
name = "my-data-source"
project_id = "11111111-1111-1111-1111-111111111111"
region = "fr-par"
name = "my-data-source"
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ resource scaleway_container_namespace main {
}

resource scaleway_container main {
name = "test-container-data"
namespace_id = scaleway_container_namespace.main.id
name = "test-container-data"
namespace_id = scaleway_container_namespace.main.id
}

// Get info by container name
data "scaleway_container" "by_name" {
namespace_id = scaleway_container_namespace.main.id
name = scaleway_container.main.name
namespace_id = scaleway_container_namespace.main.id
name = scaleway_container.main.name
}

// Get info by container ID
data "scaleway_container" "by_id" {
namespace_id = scaleway_container_namespace.main.id
container_id = scaleway_container.main.id
namespace_id = scaleway_container_namespace.main.id
container_id = scaleway_container.main.id
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/flexible_ips.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gets information about multiple Flexible IPs.
```hcl
# Find ips that share the same tags
data "scaleway_flexible_ips" "fips_by_tags" {
tags = [ "a tag" ]
tags = ["a tag"]
}

# Find ips that share the same Server ID
Expand All @@ -21,19 +21,19 @@ data "scaleway_baremetal_offer" "my_offer" {
}

resource "scaleway_baremetal_server" "base" {
name = "MyServer"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
install_config_afterward = true
name = "MyServer"
offer = data.scaleway_baremetal_offer.my_offer.offer_id
install_config_afterward = true
}

resource "scaleway_flexible_ip" "first" {
server_id = scaleway_baremetal_server.base.id
tags = [ "foo", "first" ]
tags = ["foo", "first"]
}

resource "scaleway_flexible_ip" "second" {
server_id = scaleway_baremetal_server.base.id
tags = [ "foo", "second" ]
tags = ["foo", "second"]
}

data "scaleway_flexible_ips" "fips_by_server_id" {
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ The following commands allow you to:
```terraform
// Get info by function name
data "scaleway_function" "my_function" {
name = "my-namespace-name"
name = "my-namespace-name"
namespace_id = "11111111-1111-1111-1111-111111111111"
}

// Get info by function ID
data "scaleway_function" "my_function" {
function_id = "11111111-1111-1111-1111-111111111111"
function_id = "11111111-1111-1111-1111-111111111111"
namespace_id = "11111111-1111-1111-1111-111111111111"
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/iam_ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use this data source to get SSH key information based on its ID or name.
```hcl
# Get info by SSH key name
data "scaleway_iam_ssh_key" "my_key" {
name = "my-key-name"
name = "my-key-name"
}

# Get info by SSH key id
Expand Down
Loading