-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pool_upgrade_mechanism
- Loading branch information
Showing
104 changed files
with
50,344 additions
and
17,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
page_title: "Scaleway: scaleway_instance_servers" | ||
description: |- | ||
Gets information about multiple Instance Servers. | ||
--- | ||
|
||
# scaleway_instance_servers | ||
|
||
Gets information about multiple instance servers. | ||
|
||
## Examples | ||
|
||
### Basic | ||
|
||
```hcl | ||
# Find servers by tag | ||
data "scaleway_instance_servers" "my_key" { | ||
tags = ["tag"] | ||
} | ||
# Find servers by name and zone | ||
data "scaleway_instance_servers" "my_key" { | ||
name = "myserver" | ||
zone = "fr-par-2" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `name` - (Optional) The server name used as filter. Servers with a name like it are listed. | ||
|
||
- `tags` - (Optional) List of tags used as filter. Servers with these exact tags are listed. | ||
|
||
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which servers exist. | ||
|
||
## Attributes Reference | ||
|
||
In addition to all above arguments, the following attributes are exported: | ||
|
||
- `id` - The zone of the servers | ||
|
||
- `servers` - List of found servers | ||
- `id` - The ID of the server. | ||
- `tags` - The tags associated with the server. | ||
- `public_ip` - The public IPv4 address of the server. | ||
- `private_ip` - The Scaleway internal IP address of the server. | ||
- `state` - The state of the server. Possible values are: `started`, `stopped` or `standby`. | ||
- `zone` - The [zone](../guides/regions_and_zones.md#zones) in which the server is. | ||
- `name` - The name of the server. | ||
- `boot_type` - The boot Type of the server. Possible values are: `local`, `bootscript` or `rescue`. | ||
- `bootscript_id` - The ID of the bootscript. | ||
- `type` - The commercial type of the server. | ||
- `security_group_id` - The [security group](https://developers.scaleway.com/en/products/instance/api/#security-groups-8d7f89) the server is attached to. | ||
- `enable_ipv6` - Determines if IPv6 is enabled for the server. | ||
- `ipv6_address` - The default ipv6 address routed to the server. ( Only set when enable_ipv6 is set to true ) | ||
- `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 ) | ||
- `enable_dynamic_ip` - If true a dynamic IP will be attached to the server. | ||
- `image` - The UUID or the label of the base image used by the server. | ||
- `placement_group_id` - The [placement group](https://developers.scaleway.com/en/products/instance/api/#placement-groups-d8f653) the server is attached to. | ||
- `organization_id` - The organization ID the server is associated with. | ||
- `project_id` - The ID of the project the server is associated with. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: "scaleway" | ||
page_title: "Scaleway: scaleway_rdb_database_backup" | ||
description: |- | ||
Gets information about an RDB backup. | ||
--- | ||
|
||
# scaleway_rdb_database_backup | ||
|
||
Gets information about an RDB backup. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
data scaleway_rdb_database_backup find_by_name { | ||
name = "mybackup" | ||
} | ||
data scaleway_rdb_database_backup find_by_name_and_instance { | ||
name = "mybackup" | ||
instance_id = "11111111-1111-1111-1111-111111111111" | ||
} | ||
data scaleway_rdb_database_backup find_by_id { | ||
backup_id = "11111111-1111-1111-1111-111111111111" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
- `backup_id` - (Optional) The RDB backup ID. | ||
Only one of the `name` and `backup_id` should be specified. | ||
|
||
- `instance_id` - (Optional) The RDB instance ID. | ||
|
||
- `name` - (Optional) The name of the RDB instance. | ||
Only one of the `name` and `backup_id` should be specified. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
page_title: "Scaleway: scaleway_function" | ||
description: |- | ||
Manages Scaleway Functions. | ||
--- | ||
|
||
# scaleway_function | ||
|
||
Creates and manages Scaleway Functions. | ||
For more information see [the documentation](https://developers.scaleway.com/en/products/functions/api/). | ||
|
||
## Examples | ||
|
||
### Basic | ||
|
||
```hcl | ||
resource "scaleway_function_namespace" "main" { | ||
name = "main-function-namespace" | ||
description = "Main function namespace" | ||
} | ||
resource scaleway_function main { | ||
namespace_id = scaleway_function_namespace.main.id | ||
runtime = "go118" | ||
handler = "Handle" | ||
privacy = "private" | ||
} | ||
``` | ||
|
||
### With sources and deploy | ||
|
||
You create a zip of your function (ex: `zip function.zip -r go.mod go.sum handler.go`) | ||
|
||
```hcl | ||
resource "scaleway_function_namespace" "main" { | ||
name = "main-function-namespace" | ||
description = "Main function namespace" | ||
} | ||
resource scaleway_function main { | ||
namespace_id = scaleway_function_namespace.main.id | ||
runtime = "go118" | ||
handler = "Handle" | ||
privacy = "private" | ||
zip_file = "function.zip" | ||
zip_hash = filesha256("function.zip") | ||
deploy = true | ||
} | ||
``` | ||
|
||
|
||
## Arguments Reference | ||
|
||
The following arguments are supported: | ||
|
||
- `name` - (Required) The unique name of the function. | ||
|
||
~> **Important** Updates to `name` will recreate the function. | ||
|
||
- `description` (Optional) The description of the function. | ||
|
||
- `environment_variables` - The environment variables of the function. | ||
|
||
- `privacy` - Privacy of the function. Can be either `private` or `public`. Read more on [authentication](https://developers.scaleway.com/en/products/functions/api/#authentication) | ||
|
||
- `runtime` - Runtime of the function. Runtimes can be fetched using [specific route](https://developers.scaleway.com/en/products/functions/api/#get-f7de6a) | ||
|
||
- `min_scale` - Minimum replicas for your function, defaults to 0, Note that a function is billed when it gets executed, and using a min_scale greater than 0 will cause your function container to run constantly. | ||
|
||
- `max_scale` - Maximum replicas for your function (defaults to 20), our system will scale your functions automatically based on incoming workload, but will never scale the number of replicas above the configured max_scale. | ||
|
||
- `memory_limit` - Memory limit in MB for your function, defaults to 128MB | ||
|
||
- `handler` - Handler of the function. Depends on the runtime ([function guide](https://developers.scaleway.com/en/products/functions/api/#create-a-function)) | ||
|
||
- `timeout` - Holds the max duration (in seconds) the function is allowed for responding to a request | ||
|
||
- `zip_file` - Location of the zip file to upload containing your function sources | ||
|
||
- `zip_hash` - The hash of your source zip file, changing it will re-apply function. Can be any string, changing it will just trigger state change. You can use any terraform hash function to trigger a change on your zip change (see examples) | ||
|
||
- `deploy` - Define if the function should be deployed, terraform will wait for function to be deployed. Function will get deployed if you change source zip | ||
|
||
- `region` - (Defaults to [provider](../index.md#region) `region`). The [region](../guides/regions_and_zones.md#regions) in which the namespace should be created. | ||
|
||
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the namespace is associated with. | ||
|
||
|
||
## Attributes Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
- `id` - The ID of the function | ||
- `organization_id` - The organization ID the function is associated with. | ||
- `cpu_limit` - The CPU limit in mCPU for your function. More infos on resources [here](https://developers.scaleway.com/en/products/functions/api/#functions) | ||
|
||
|
||
## Import | ||
|
||
Functions can be imported using the `{region}/{id}`, e.g. | ||
|
||
```bash | ||
$ terraform import scaleway_function.main fr-par/11111111-1111-1111-1111-111111111111 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
page_title: "Scaleway: scaleway_rdb_database_backup" | ||
description: |- | ||
Manages Scaleway RDB Database Backup. | ||
--- | ||
|
||
# scaleway_rdb_database_backup | ||
|
||
Creates and manages Scaleway RDB database backup. | ||
For more information, see [the documentation](https://developers.scaleway.com/en/products/rdb/api). | ||
|
||
## Examples | ||
|
||
### Basic | ||
|
||
```hcl | ||
resource scaleway_rdb_database_backup "main" { | ||
instance_id = data.scaleway_rdb_instance.main.id | ||
database_name = data.scaleway_rdb_database.main.name | ||
} | ||
``` | ||
|
||
### With expiration | ||
|
||
```hcl | ||
resource scaleway_rdb_database_backup "main" { | ||
instance_id = data.scaleway_rdb_instance.main.id | ||
database_name = data.scaleway_rdb_database.main.name | ||
expires_at = "2022-06-16T07:48:44Z" | ||
} | ||
``` | ||
|
||
## Arguments Reference | ||
|
||
The following arguments are supported: | ||
|
||
- `instance_id` - (Required) UUID of the instance where the database to backup is. | ||
|
||
~> **Important:** Updates to `instance_id` will recreate the Backup. | ||
|
||
- `name` - (Required) Name of the database (e.g. `my-database`). | ||
|
||
- `expires_at` (Optional) Expiration date (Format ISO 8601). | ||
|
||
~> **Important:** `expires_at` cannot be removed after being set. | ||
|
||
|
||
## Attributes Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
- `size` - Size of the backup (in bytes). | ||
- `instance_name` - Name of the instance of the backup. | ||
- `created_at` - Creation date (Format ISO 8601). | ||
- `updated_at` - Updated date (Format ISO 8601). | ||
|
||
|
||
## Import | ||
|
||
RDB Database can be imported using the `{region}/{id}`, e.g. | ||
|
||
```bash | ||
$ terraform import scaleway_rdb_database_backup.mybackup fr-par/11111111-1111-1111-1111-111111111111 | ||
``` |
Oops, something went wrong.