Skip to content

Commit 3fe3e5c

Browse files
authored
feat: brk make organization_id computed (#746)
1 parent 7ef294b commit 3fe3e5c

25 files changed

+57
-85
lines changed

docs/data-sources/account_ssh_key.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@ data "scaleway_account_ssh_key" "my_key" {
2626

2727
- `name` - The SSH key name. Only one of `name` and `ssh_key_id` should be specified.
2828
- `ssh_key_id` - The SSH key id. Only one of `name` and `ssh_key_id` should be specified.
29-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the SSH key is associated with.
3029
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the SSH key is associated with.
3130

32-
3331
## Attributes Reference
3432

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

3735
- `id` - The ID of the SSH public key.
3836
- `public_key` - The SSH public key string
37+
- `organization_id` - The ID of the organization the SSH key is associated with.

docs/data-sources/instance_volume.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ data "scaleway_instance_volume" "my_volume" {
3232

3333
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume exists.
3434

35-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the volume is associated with.
3635

3736
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the volume is associated with.
3837

@@ -53,3 +52,5 @@ In addition to all above arguments, the following attributes are exported:
5352
- `size` - The volumes disk size (in bytes).
5453

5554
- `server` - Information about the server attached to the volume.
55+
56+
- `organization_id` - The ID of the organization the volume is associated with.

docs/data-sources/lb_ip.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ data "scaleway_lb_ip" "my_ip" {
3232

3333
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#zones) in which the LB IP exists.
3434

35-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the LB IP is associated with.
36-
3735
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the LB IP is associated with.
3836

3937
## Attributes Reference
@@ -43,3 +41,5 @@ In addition to all above arguments, the following attributes are exported:
4341
- `reverse` - The reverse domain associated with this IP.
4442

4543
- `lb_id` - The associated load-balance ID if any
44+
45+
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the LB IP is associated with.

docs/data-sources/registry_image.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ data "scaleway_registry_image" "my_image" {
3535

3636
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the image exists.
3737

38-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the image is associated with.
39-
4038
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the image is associated with.
4139

4240
## Attributes Reference
@@ -47,3 +45,4 @@ In addition to all above arguments, the following attributes are exported:
4745
- `size` - The size of the registry image.
4846
- `visibility` - The privacy policy of the registry image.
4947
- `tags` - The tags associated with the registry image
48+
- `organization_id` - The organization ID the image is associated with.

docs/data-sources/registry_namespace.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ data "scaleway_registry_namespace" "my_namespace" {
3232

3333
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the namespace exists.
3434

35-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the namespace is associated with.
36-
3735
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the namespace is associated with.
3836

3937
## Attributes Reference
@@ -43,3 +41,4 @@ In addition to all above arguments, the following attributes are exported:
4341
- `id` - The ID of the Registry Namespace.
4442
- `is_public` - The Namespace Privacy Policy: whether or not the images are public.
4543
- `endpoint` - The endpoint of the Registry Namespace.
44+
- `organization_id` - The organization ID the namespace is associated with.

docs/index.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ resource "scaleway_instance_server" "web" {
103103

104104
## Authentication
105105

106-
The Scaleway authentication is based on an **access key** and a **secret key**.
106+
The Scaleway authentication is based on an **access key**, and a **secret key**.
107107
Since secret keys are only revealed one time (when it is first created) you might
108-
need to create a new one in the section "API Tokens" of the
109-
[Scaleway console](https://console.scaleway.com/account/credentials).
110-
Click on the "Generate new token" button to create them. Giving it a friendly-name is recommended.
108+
need to create a new one in the section "API Keys" of the [Scaleway console](https://console.scaleway.com/project/credentials).
109+
Click on the "Generate new API key" button to create them.
110+
Giving it a friendly-name is recommended.
111111

112112
The Scaleway provider offers three ways of providing these credentials.
113113
The following methods are supported, in this priority order:
@@ -163,14 +163,13 @@ You can find more information about this configuration [in the documentation](ht
163163

164164
In addition to [generic provider arguments](https://www.terraform.io/docs/configuration/providers.html) (e.g. `alias` and `version`), the following arguments are supported in the Scaleway provider block:
165165

166-
| Provider Argument | [Environment Variables](#environment-variables) | Description | Mandatory |
167-
|-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------|
168-
| `access_key` | `SCW_ACCESS_KEY` | [Scaleway access key](https://console.scaleway.com/project/credentials) ||
169-
| `secret_key` | `SCW_SECRET_KEY` | [Scaleway secret key](https://console.scaleway.com/project/credentials) ||
170-
| `organization_id` | `SCW_DEFAULT_ORGANIZATION_ID` | The [organization ID](https://console.scaleway.com/account/organization/profile) that will be used as default value for all resources. | |
171-
| `project_id` | `SCW_DEFAULT_PROJECT_ID` | The [project ID](https://console.scaleway.com/project/settings) that will be used as default value for all resources. | |
172-
| `region` | `SCW_DEFAULT_REGION` | The [region](./guides/regions_and_zones.md#regions) that will be used as default value for all resources. | |
173-
| `zone` | `SCW_DEFAULT_ZONE` | The [zone](./guides/regions_and_zones.md#zones) that will be used as default value for all resources. | |
166+
| Provider Argument | [Environment Variables](#environment-variables) | Description | Mandatory |
167+
|-------------------|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-----------|
168+
| `access_key` | `SCW_ACCESS_KEY` | [Scaleway access key](https://console.scaleway.com/project/credentials) ||
169+
| `secret_key` | `SCW_SECRET_KEY` | [Scaleway secret key](https://console.scaleway.com/project/credentials) ||
170+
| `project_id` | `SCW_DEFAULT_PROJECT_ID` | The [project ID](https://console.scaleway.com/project/settings) that will be used as default value for all resources. ||
171+
| `region` | `SCW_DEFAULT_REGION` | The [region](./guides/regions_and_zones.md#regions) that will be used as default value for all resources. (`fr-par` if none specified) | |
172+
| `zone` | `SCW_DEFAULT_ZONE` | The [zone](./guides/regions_and_zones.md#zones) that will be used as default value for all resources. (`fr-par-1` if none specified) | |
174173

175174
## Store terraform state on Scaleway S3-compatible object storage
176175

@@ -192,7 +191,7 @@ terraform {
192191
}
193192
```
194193

195-
Beware as no locking mechanism are yet supported.
194+
Be careful as no locking mechanism are yet supported.
196195
Using scaleway object storage as terraform backend is not suitable if you work in a team with a risk of simultaneous access to the same plan.
197196

198197
Note: For security reason it's not recommended to store secrets in terraform files.

docs/resources/account_ssh_key.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ The following arguments are supported:
2323

2424
- `name` - (Required) The name of the SSH key.
2525
- `public_key` - (Required) The public SSH key to be added.
26-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the SSH key is associated with.
2726
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the SSH key is associated with.
2827

2928
## Attributes Reference
3029

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

3332
- `id` - The ID of the SSH key.
33+
- `organization_id` - The organization ID the SSH key is associated with.
3434

3535
## Import
3636

docs/resources/baremetal_server.md

+5-15
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,20 @@ resource "scaleway_baremetal_server" "base" {
3030
The following arguments are supported:
3131

3232
- `offer` - (Required) The offer name or UUID of the baremetal server.
33-
Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-334154) to find the right offer.
33+
Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-334154) to find the right offer.
3434

3535
~> **Important:** Updates to `offer` will recreate the server.
3636

3737
- `os` - (Required) The UUID of the os to install on the server.
38-
Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
39-
40-
~> **Important:** Updates to `os` will reinstall the server.
41-
38+
Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
39+
~> **Important:** Updates to `os` will reinstall the server.
4240
- `ssh_key_ids` - (Required) List of SSH keys allowed to connect to the server.
43-
44-
~> **Important:** Updates to `ssh_key_ids` will reinstall the server.
45-
41+
~> **Important:** Updates to `ssh_key_ids` will reinstall the server.
4642
- `name` - (Optional) The name of the server.
47-
4843
- `hostname` - (Optional) The hostname of the server.
49-
5044
- `description` - (Optional) A description for the server.
51-
5245
- `tags` - (Optional) The tags associated with the server.
53-
5446
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the server should be created.
55-
56-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the server is associated with.
57-
5847
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the server is associated with.
5948

6049

@@ -71,6 +60,7 @@ In addition to all above arguments, the following attributes are exported:
7160
- `reverse` - The reverse of the IP.
7261
- `type` - The type of the IP.
7362
- `domain` - The domain of the server.
63+
- `organization_id` - The organization ID the server is associated with.
7464

7565
## Import
7666

docs/resources/instance_ip.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ resource "scaleway_instance_ip" "server_ip" {}
1919
The following arguments are supported:
2020

2121
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the IP should be reserved.
22-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the IP is associated with.
2322
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the IP is associated with.
2423

2524
## Attributes Reference
@@ -29,6 +28,7 @@ In addition to all above arguments, the following attributes are exported:
2928
- `id` - The ID of the IP.
3029
- `address` - The IP address.
3130
- `reverse` - The reverse dns attached to this IP
31+
- `organization_id` - The organization ID the IP is associated with.
3232

3333
## Import
3434

docs/resources/instance_placement_group.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ The following arguments are supported:
2222
- `policy_type` - (Defaults to `max_availability`) The [policy type](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) of the placement group. Possible values are: `low_latency` or `max_availability`.
2323
- `policy_mode` - (Defaults to `optional`) The [policy mode](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) of the placement group. Possible values are: `optional` or `enforced`.
2424
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the placement group should be created.
25-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the placement group is associated with.
2625
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the placement group is associated with.
2726

2827
## Attributes Reference
@@ -31,6 +30,7 @@ In addition to all above arguments, the following attributes are exported:
3130

3231
- `id` - The ID of the placement group.
3332
- `policy_respected` - Is true when the policy is respected.
33+
- `organization_id` - The organization ID the placement group is associated with.
3434

3535
## Import
3636

docs/resources/instance_security_group.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ The following arguments are supported:
116116

117117
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the security group should be created.
118118

119-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the security group is associated with.
120119

121120
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the security group is associated with.
122121

@@ -144,6 +143,7 @@ The `inbound_rule` and `outbound_rule` block supports:
144143
In addition to all above arguments, the following attributes are exported:
145144

146145
- `id` - The ID of the security group.
146+
- `organization_id` - The organization ID the security group is associated with.
147147

148148
## Import
149149

docs/resources/instance_server.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ attached to the server. Updates to this field will trigger a stop/start of the s
183183

184184
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the server should be created.
185185

186-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the server is associated with.
187-
If you intend to deploy your instance in another project than the default one use your `project_id` instead of the organization id.
188-
189186
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the server is associated with.
190187

191188

@@ -203,6 +200,7 @@ In addition to all above arguments, the following attributes are exported:
203200
- `ipv6_gateway` - The ipv6 gateway address. ( Only set when enable_ipv6 is set to true )
204201
- `ipv6_prefix_length` - The prefix length of the ipv6 subnet routed to the server. ( Only set when enable_ipv6 is set to true )
205202
- `boot_type` - The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`.
203+
- `organization_id` - The organization ID the server is associated with.
206204

207205
## Import
208206

docs/resources/instance_volume.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ description: |-
66

77
# scaleway_instance_volume
88

9-
Creates and manages Scaleway Compute Instance Volumes. For more information, see [the documentation](https://developers.scaleway.com/en/products/instance/api/#volumes-7e8a39).
9+
Creates and manages Scaleway Compute Instance Volumes.
10+
For more information, see [the documentation](https://developers.scaleway.com/en/products/instance/api/#volumes-7e8a39).
1011

1112
## Example
1213

@@ -28,7 +29,6 @@ The following arguments are supported:
2829
- ``from_snapshot_id`` - (Optional) If set, the new volume will be created from this snapshot. Only one of `size_in_gb`, `from_volume_id` and `from_snapshot_id` should be specified.
2930
- `name` - (Optional) The name of the volume. If not provided it will be randomly generated.
3031
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume should be created.
31-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the volume is associated with.
3232
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the volume is associated with.
3333

3434
## Attributes Reference
@@ -37,6 +37,7 @@ In addition to all above arguments, the following attributes are exported:
3737

3838
- `id` - The ID of the volume.
3939
- `server_id` - The id of the associated server.
40+
- `organization_id` - The organization ID the volume is associated with.
4041

4142
## Import
4243

docs/resources/k8s_cluster.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ The following arguments are supported:
157157

158158
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the cluster should be created.
159159

160-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the cluster is associated with.
161160

162161
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the cluster is associated with.
163162

@@ -178,6 +177,7 @@ In addition to all above arguments, the following attributes are exported:
178177
- `token` - The token to connect to the Kubernetes API server.
179178
- `status` - The status of the Kubernetes cluster.
180179
- `upgrade_available` - Set to `true` if a newer Kubernetes version is available.
180+
- `organization_id` - The organization ID the cluster is associated with.
181181

182182
## Import
183183

docs/resources/lb.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ description: |-
66

77
# scaleway_lb
88

9-
-> **Note:** This terraform resource is flagged beta and might include breaking change in future releases.
10-
11-
Creates and manages Scaleway Load-Balancers. For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
9+
Creates and manages Scaleway Load-Balancers.
10+
For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
1211

1312
## Examples
1413

@@ -43,7 +42,6 @@ The following arguments are supported:
4342

4443
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the load-balancer should be created.
4544

46-
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the load-balancer is associated with.
4745

4846
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the load-balancer is associated with.
4947

@@ -53,6 +51,7 @@ In addition to all arguments above, the following attributes are exported:
5351

5452
- `id` - The ID of the load-balancer.
5553
- `ip_address` - The load-balance public IP Address
54+
- `organization_id` - The organization ID the load-balancer is associated with.
5655

5756
## IP ID
5857

docs/resources/lb_backend.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ description: |-
66

77
# scaleway_lb_backend
88

9-
-> **Note:** This terraform resource is flagged beta and might include breaking change in future releases.
10-
11-
Creates and manages Scaleway Load-Balancer Backends. For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
9+
Creates and manages Scaleway Load-Balancer Backends.
10+
For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
1211

1312
## Examples
1413

0 commit comments

Comments
 (0)