Skip to content

feat: brk make organization_id computed #746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jan 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions docs/data-sources/account_ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ data "scaleway_account_ssh_key" "my_key" {

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


## Attributes Reference

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

- `id` - The ID of the SSH public key.
- `public_key` - The SSH public key string
- `organization_id` - The ID of the organization the SSH key is associated with.
3 changes: 2 additions & 1 deletion docs/data-sources/instance_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ data "scaleway_instance_volume" "my_volume" {

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

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

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

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

- `server` - Information about the server attached to the volume.

- `organization_id` - The ID of the organization the volume is associated with.
4 changes: 2 additions & 2 deletions docs/data-sources/lb_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ data "scaleway_lb_ip" "my_ip" {

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

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

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

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

- `lb_id` - The associated load-balance ID if any

- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the LB IP is associated with.
3 changes: 1 addition & 2 deletions docs/data-sources/registry_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ data "scaleway_registry_image" "my_image" {

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

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

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

## Attributes Reference
Expand All @@ -47,3 +45,4 @@ In addition to all above arguments, the following attributes are exported:
- `size` - The size of the registry image.
- `visibility` - The privacy policy of the registry image.
- `tags` - The tags associated with the registry image
- `organization_id` - The organization ID the image is associated with.
3 changes: 1 addition & 2 deletions docs/data-sources/registry_namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ data "scaleway_registry_namespace" "my_namespace" {

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

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

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

## Attributes Reference
Expand All @@ -43,3 +41,4 @@ In addition to all above arguments, the following attributes are exported:
- `id` - The ID of the Registry Namespace.
- `is_public` - The Namespace Privacy Policy: whether or not the images are public.
- `endpoint` - The endpoint of the Registry Namespace.
- `organization_id` - The organization ID the namespace is associated with.
25 changes: 12 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ resource "scaleway_instance_server" "web" {

## Authentication

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

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

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:

| Provider Argument | [Environment Variables](#environment-variables) | Description | Mandatory |
|-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------|
| `access_key` | `SCW_ACCESS_KEY` | [Scaleway access key](https://console.scaleway.com/project/credentials) | ✅ |
| `secret_key` | `SCW_SECRET_KEY` | [Scaleway secret key](https://console.scaleway.com/project/credentials) | ✅ |
| `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. | |
| `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. | |
| `region` | `SCW_DEFAULT_REGION` | The [region](./guides/regions_and_zones.md#regions) that will be used as default value for all resources. | |
| `zone` | `SCW_DEFAULT_ZONE` | The [zone](./guides/regions_and_zones.md#zones) that will be used as default value for all resources. | |
| Provider Argument | [Environment Variables](#environment-variables) | Description | Mandatory |
|-------------------|-------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-----------|
| `access_key` | `SCW_ACCESS_KEY` | [Scaleway access key](https://console.scaleway.com/project/credentials) | ✅ |
| `secret_key` | `SCW_SECRET_KEY` | [Scaleway secret key](https://console.scaleway.com/project/credentials) | ✅ |
| `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. | ✅ |
| `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) | |
| `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) | |

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

Expand All @@ -192,7 +191,7 @@ terraform {
}
```

Beware as no locking mechanism are yet supported.
Be careful as no locking mechanism are yet supported.
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.

Note: For security reason it's not recommended to store secrets in terraform files.
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/account_ssh_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The following arguments are supported:

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

## Attributes Reference

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

- `id` - The ID of the SSH key.
- `organization_id` - The organization ID the SSH key is associated with.

## Import

Expand Down
20 changes: 5 additions & 15 deletions docs/resources/baremetal_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,20 @@ resource "scaleway_baremetal_server" "base" {
The following arguments are supported:

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

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

- `os` - (Required) The UUID of the os to install on the server.
Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.

~> **Important:** Updates to `os` will reinstall the server.

Use [this endpoint](https://developers.scaleway.com/en/products/baremetal/api/#get-87598a) to find the right OS ID.
~> **Important:** Updates to `os` will reinstall the server.
- `ssh_key_ids` - (Required) List of SSH keys allowed to connect to the server.

~> **Important:** Updates to `ssh_key_ids` will reinstall the server.

~> **Important:** Updates to `ssh_key_ids` will reinstall the server.
- `name` - (Optional) The name of the server.

- `hostname` - (Optional) The hostname of the server.

- `description` - (Optional) A description for the server.

- `tags` - (Optional) The tags associated with the server.

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

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

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


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

## Import

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ resource "scaleway_instance_ip" "server_ip" {}
The following arguments are supported:

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

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

## Import

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_placement_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The following arguments are supported:
- `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`.
- `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`.
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the placement group should be created.
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the placement group is associated with.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the placement group is associated with.

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

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

## Import

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_security_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ The following arguments are supported:

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

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

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

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

- `id` - The ID of the security group.
- `organization_id` - The organization ID the security group is associated with.

## Import

Expand Down
4 changes: 1 addition & 3 deletions docs/resources/instance_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ attached to the server. Updates to this field will trigger a stop/start of the s

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

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

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


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

## Import

Expand Down
5 changes: 3 additions & 2 deletions docs/resources/instance_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ description: |-

# scaleway_instance_volume

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

## Example

Expand All @@ -28,7 +29,6 @@ The following arguments are supported:
- ``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.
- `name` - (Optional) The name of the volume. If not provided it will be randomly generated.
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the volume should be created.
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the volume is associated with.
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the volume is associated with.

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

- `id` - The ID of the volume.
- `server_id` - The id of the associated server.
- `organization_id` - The organization ID the volume is associated with.

## Import

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/k8s_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ The following arguments are supported:

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

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

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

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

## Import

Expand Down
7 changes: 3 additions & 4 deletions docs/resources/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: |-

# scaleway_lb

-> **Note:** This terraform resource is flagged beta and might include breaking change in future releases.

Creates and manages Scaleway Load-Balancers. For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
Creates and manages Scaleway Load-Balancers.
For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).

## Examples

Expand Down Expand Up @@ -43,7 +42,6 @@ The following arguments are supported:

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

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

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

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

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

## IP ID

Expand Down
5 changes: 2 additions & 3 deletions docs/resources/lb_backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ description: |-

# scaleway_lb_backend

-> **Note:** This terraform resource is flagged beta and might include breaking change in future releases.

Creates and manages Scaleway Load-Balancer Backends. For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).
Creates and manages Scaleway Load-Balancer Backends.
For more information, see [the documentation](https://developers.scaleway.com/en/products/lb/api).

## Examples

Expand Down
Loading