Skip to content

Commit 5ed2711

Browse files
committed
docs: add support for template based rendering
1 parent 288f8bb commit 5ed2711

File tree

226 files changed

+19555
-0
lines changed

Some content is hidden

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

226 files changed

+19555
-0
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,4 @@ jobs:
6666
- uses: hashicorp/setup-terraform@v3
6767
- run: go tool tfplugindocs validate
6868
- run: go tool tfplugindocs generate
69+
- run: git diff --exit-code docs
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
subcategory: "Account"
3+
page_title: "Scaleway: scaleway_account_project"
4+
---
5+
6+
# scaleway_account_project
7+
8+
The `scaleway_account_project` data source is used to retrieve information about a Scaleway project.
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 Project
14+
15+
The following commands allow you to:
16+
17+
- retrieve a Project by its name
18+
- retrieve a Project by its ID
19+
- retrieve the default project of an Organization
20+
21+
```hcl
22+
# Get info by name
23+
data scaleway_account_project "by_name" {
24+
name = "myproject"
25+
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
26+
}
27+
# Get default project
28+
data scaleway_account_project "by_name" {
29+
name = "default"
30+
}
31+
# Get info by ID
32+
data scaleway_account_project "by_id" {
33+
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
34+
}
35+
```
36+
37+
## Argument Reference
38+
39+
This section lists the arguments that you can provide to the `scaleway_account_project` data source to filter and retrieve the desired project. Each argument has a specific purpose:
40+
41+
- `name` - (Optional) The name of the Project.
42+
Only one of the `name` and `project_id` should be specified.
43+
44+
- `project_id` - (Optional) The unique identifier of the Project.
45+
Only one of the `name` and `project_id` should be specified.
46+
47+
- `organization_id` - (Optional) The unique identifier of the Organization with which the Project is associated.
48+
49+
If no default `organization_id` is set, one must be set explicitly in this datasource
50+
51+
## Attribute reference
52+
53+
The `scaleway_account_project` data source exports certain attributes once the account information is retrieved. These attributes can be referenced in other parts of your Terraform configuration. The exported attributes come from the `account_project` [resource](../resources/account_project.md).
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.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
subcategory: "Account"
3+
page_title: "Scaleway: scaleway_account_ssh_key"
4+
---
5+
6+
# scaleway_account_ssh_key
7+
8+
The `scaleway_account_ssh_key` data source is used to retrieve information about a the SSH key of a Scaleway account.
9+
10+
Refer to the Organizations and Projects [documentation](https://www.scaleway.com/en/docs/organizations-and-projects/how-to/create-ssh-key/) and [API documentation](https://www.scaleway.com/en/developers/api/iam/#path-ssh-keys) for more information.
11+
12+
13+
## Retrieve the SSH key of a Scaleway account
14+
15+
The following commands allow you to:
16+
17+
- retrieve an SSH key by its name
18+
- retrieve an SSH key by its ID
19+
20+
```hcl
21+
# Get info by SSH key name
22+
data "scaleway_account_ssh_key" "my_key" {
23+
name = "my-key-name"
24+
}
25+
26+
# Get info by SSH key id
27+
data "scaleway_account_ssh_key" "my_key" {
28+
ssh_key_id = "11111111-1111-1111-1111-111111111111"
29+
}
30+
```
31+
32+
## Argument Reference
33+
34+
This section lists the arguments that you can provide to the `scaleway_account_ssh_key` data source to filter and retrieve the desired SSH key. Each argument has a specific purpose:
35+
36+
- `name` - The name of the SSH key.
37+
- `ssh_key_id` - The unique identifier of the SSH key.
38+
39+
-> **Note** You must specify at least one: `name` and/or `ssh_key_id`.
40+
41+
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The unique identifier of the project with which the SSH key is associated.
42+
43+
## Attributes Reference
44+
45+
The `scaleway_account_ssh_key` data source exports certain attributes once the SSH key information is retrieved. These attributes can be referenced in other parts of your Terraform configuration.
46+
47+
In addition to all above arguments, the following attributes are exported:
48+
49+
- `id` - The unique identifier of the SSH public key.
50+
- `public_key` - The string of the SSH public key.
51+
- `organization_id` - The unique identifier of the Organization with which the SSH key is associated.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
subcategory: "Account"
3+
page_title: "Scaleway: scaleway_availability_zones"
4+
---
5+
6+
# scaleway_availability_zones
7+
8+
The `scaleway_availability_zones` data source is used to retrieve information about the available zones based on its Region.
9+
10+
For technical and legal reasons, some products are split by Region or by Availability Zones. When using such product,
11+
you can choose the location that better fits your need (country, latency, etc.).
12+
13+
Refer to the Account [documentation](https://www.scaleway.com/en/docs/console/account/reference-content/products-availability/) for more information.
14+
15+
## Retrieve the Availability Zones of a Region
16+
17+
The following command allow you to retrieve a the AZs of a Region.
18+
19+
```hcl
20+
# Get info by Region key
21+
data "scaleway_availability_zones" "main" {
22+
region = "nl-ams"
23+
}
24+
```
25+
26+
## Argument Reference
27+
28+
This section lists the arguments that you can provide to the `scaleway_availability_zones` data source to filter and retrieve the desired AZs:
29+
30+
- `region` - Region is represented as a Geographical area, such as France. Defaults to `fr-par`.
31+
32+
## Attributes Reference
33+
34+
The `scaleway_availability_zones` data source exports certain attributes once the Availability Zones information is retrieved. These attributes can be referenced in other parts of your Terraform configuration.
35+
36+
In addition to all above arguments, the following attributes are exported:
37+
38+
- `id` - The unique identifier of the Region
39+
- `zones` - The list of availability zones in each Region
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
subcategory: "Elastic Metal"
3+
page_title: "Scaleway: scaleway_baremetal_offer"
4+
---
5+
6+
# scaleway_baremetal_offer
7+
8+
Gets information about a baremetal offer. For more information, see the [API documentation](https://developers.scaleway.com/en/products/baremetal/api).
9+
10+
## Example Usage
11+
12+
```hcl
13+
# Get info by offer name
14+
data "scaleway_baremetal_offer" "my_offer" {
15+
zone = "fr-par-2"
16+
name = "EM-A210R-SATA"
17+
}
18+
19+
# Get info by offer id
20+
data "scaleway_baremetal_offer" "my_offer" {
21+
zone = "fr-par-2"
22+
offer_id = "25dcf38b-c90c-4b18-97a2-6956e9d1e113"
23+
}
24+
```
25+
26+
## Argument Reference
27+
28+
- `name` - (Optional) The offer name. Only one of `name` and `offer_id` should be specified.
29+
30+
- `subscription_period` - (Optional) Period of subscription the desired offer. Should be `hourly` or `monthly`.
31+
32+
- `offer_id` - (Optional) The offer id. Only one of `name` and `offer_id` should be specified.
33+
34+
- `allow_disabled` - (Optional, default `false`) Include disabled offers.
35+
36+
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the offer should be created.
37+
38+
## Attributes Reference
39+
40+
In addition to all above arguments, the following attributes are exported:
41+
42+
- `id` - The ID of the offer.
43+
44+
~> **Important:** Baremetal offers' 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`
45+
46+
- `bandwidth` - Available Bandwidth with the offer.
47+
48+
- `commercial_range` - Commercial range of the offer.
49+
50+
- `cpu` - A list of cpu specifications. (Structure is documented below.)
51+
52+
- `disk` - A list of disk specifications. (Structure is documented below.)
53+
54+
- `memory` - A list of memory specifications. (Structure is documented below.)
55+
56+
- `stock` - Stock status for this offer. Possible values are: `empty`, `low` or `available`.
57+
58+
The `cpu` block supports:
59+
60+
- `name` - Name of the CPU.
61+
62+
- `core_count`- Number of core on this CPU.
63+
64+
- `frequency`- Frequency of the CPU in MHz.
65+
66+
- `thread_count`- Number of thread on this CPU.
67+
68+
The `disk` block supports:
69+
70+
- `type` - Type of disk.
71+
72+
- `capacity`- Capacity of the disk in GB.
73+
74+
The `memory` block supports:
75+
76+
- `type` - Type of memory.
77+
78+
- `capacity`- Capacity of the memory in GB.
79+
80+
- `frequency` - Frequency of the memory in MHz.
81+
82+
- `is_ecc`- True if error-correcting code is available on this memory.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
subcategory: "Elastic Metal"
3+
page_title: "Scaleway: scaleway_baremetal_option"
4+
---
5+
6+
# scaleway_baremetal_option
7+
8+
Gets information about a baremetal option.
9+
For more information, see the [API documentation](https://developers.scaleway.com/en/products/baremetal/api).
10+
11+
## Example Usage
12+
13+
```hcl
14+
# Get info by option name
15+
data "scaleway_baremetal_option" "by_name" {
16+
name = "Remote Access"
17+
}
18+
19+
# Get info by option id
20+
data "scaleway_baremetal_option" "by_id" {
21+
option_id = "931df052-d713-4674-8b58-96a63244c8e2"
22+
}
23+
```
24+
25+
## Argument Reference
26+
27+
- `name` - (Optional) The option name. Only one of `name` and `option_id` should be specified.
28+
- `option_id` - (Optional) The option id. Only one of `name` and `option_id` should be specified.
29+
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the option exists.
30+
31+
## Attributes Reference
32+
33+
In addition to all above arguments, the following attributes are exported:
34+
35+
- `id` - The ID of the option.
36+
37+
~> **Important:** Baremetal options' 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`
38+
39+
- `name` - The name of the option.
40+
- `manageable` - Is false if the option could not be added or removed.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
subcategory: "Elastic Metal"
3+
page_title: "Scaleway: scaleway_baremetal_os"
4+
---
5+
6+
# scaleway_baremetal_os
7+
8+
Gets information about a baremetal operating system.
9+
For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/elastic-metal/#path-os-list-available-oses).
10+
11+
You can also use the [scaleway-cli](https://github.com/scaleway/scaleway-cli) with `scw baremetal os list` to list all available operating systems.
12+
13+
## Example Usage
14+
15+
```hcl
16+
# Get info by os name and version
17+
data "scaleway_baremetal_os" "by_name" {
18+
name = "Ubuntu"
19+
version = "20.04 LTS (Focal Fossa)"
20+
}
21+
22+
# Get info by os id
23+
data "scaleway_baremetal_os" "by_id" {
24+
os_id = "03b7f4ba-a6a1-4305-984e-b54fafbf1681"
25+
}
26+
```
27+
28+
## Argument Reference
29+
30+
- `name` - (Optional) The os name. Only one of `name` and `os_id` should be specified.
31+
- `version` - (Optional) The os version.
32+
- `os_id` - (Optional) The operating system id. Only one of `name` and `os_id` should be specified.
33+
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the os exists.
34+
35+
## Attributes Reference
36+
37+
In addition to all above arguments, the following attributes are exported:
38+
39+
- `id` - The resource's ID
40+
41+
~> **Important:** Baremetal operating systems' 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`

0 commit comments

Comments
 (0)