Skip to content

doc: format examples and relocate inference model datasource #3121

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
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
2 changes: 1 addition & 1 deletion docs/data-sources/availability_zones.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following command allow you to retrieve a the AZs of a Region.

```hcl
# Get info by Region key
data scaleway_availability_zones main {
data "scaleway_availability_zones" "main" {
region = "nl-ams"
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ The following commands allow you to:
- retrieve a container by its ID

```hcl
resource scaleway_container_namespace main {
resource "scaleway_container_namespace" "main" {
}

resource scaleway_container main {
resource "scaleway_container" "main" {
name = "test-container-data"
namespace_id = scaleway_container_namespace.main.id
}
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/inference_model.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "inference"
subcategory: "Inference"
page_title: "Scaleway: scaleway_inference_model"
---

Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/lb_certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ For more information, see the [main documentation](https://www.scaleway.com/en/d
### Let's Encrypt

```hcl
resource scaleway_lb_ip main {
resource "scaleway_lb_ip" "main" {
}
resource scaleway_lb main {
resource "scaleway_lb" "main" {
ip_id = scaleway_lb_ip.main.id
name = "data-test-lb-cert"
type = "LB-S"
}
resource scaleway_lb_certificate main {
resource "scaleway_lb_certificate" "main" {
lb_id = scaleway_lb.main.id
name = "data-test-lb-cert"
letsencrypt {
Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/rdb_database_backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Gets information about an RDB backup.
## Example Usage

```hcl
data scaleway_rdb_database_backup find_by_name {
data "scaleway_rdb_database_backup" "find_by_name" {
name = "mybackup"
}

data scaleway_rdb_database_backup find_by_name_and_instance {
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 {
data "scaleway_rdb_database_backup" "find_by_id" {
backup_id = "11111111-1111-1111-1111-111111111111"
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/vpc_gateway_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ resource "scaleway_vpc_gateway_network" "main" {
enable_masquerade = true
}

data scaleway_vpc_gateway_network by_id {
data "scaleway_vpc_gateway_network" "by_id" {
gateway_network_id = scaleway_vpc_gateway_network.main.id
}

data scaleway_vpc_gateway_network by_gateway_and_pn {
data "scaleway_vpc_gateway_network" "by_gateway_and_pn" {
gateway_id = scaleway_vpc_public_gateway.pg01.id
private_network_id = scaleway_vpc_private_network.pn01.id
}
Expand Down
6 changes: 3 additions & 3 deletions docs/data-sources/vpc_routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Gets information about multiple VPC routes.
## Example Usage

```hcl
resource scaleway_vpc vpc01 {
resource "scaleway_vpc" "vpc01" {
name = "tf-vpc-route"
enable_routing = true
}

resource scaleway_vpc_private_network pn01 {
resource "scaleway_vpc_private_network" "pn01" {
name = "tf-pn-route"
vpc_id = scaleway_vpc.vpc01.id
}

resource scaleway_vpc_private_network pn02 {
resource "scaleway_vpc_private_network" "pn02" {
name = "tf-pn_route-2"
vpc_id = scaleway_vpc.vpc01.id
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/apple_silicon_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ see the [API documentation](https://www.scaleway.com/en/developers/api/apple-sil
### Basic

```terraform
resource scaleway_apple_silicon_server server {
resource "scaleway_apple_silicon_server" "server" {
name = "test-m1"
type = "M1-M"
}
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ For more information on the limitations of Serverless Containers, refer to the [
## Example Usage

```terraform
resource scaleway_container_namespace main {
resource "scaleway_container_namespace" "main" {
name = "my-ns-test"
description = "test container"
}

resource scaleway_container main {
resource "scaleway_container" "main" {
name = "my-container-02"
description = "environment variables test"
namespace_id = scaleway_container_namespace.main.id
Expand Down Expand Up @@ -179,7 +179,7 @@ The period between health checks is also configurable.
Example:

```terraform
resource scaleway_container main {
resource "scaleway_container" "main" {
name = "my-container-02"
namespace_id = scaleway_container_namespace.main.id

Expand All @@ -206,7 +206,7 @@ It replaces current `max_concurrency` that has been deprecated.
Example:

```terraform
resource scaleway_container main {
resource "scaleway_container" "main" {
name = "my-container-02"
namespace_id = scaleway_container_namespace.main.id

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/container_cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Refer to the Containers CRON triggers [documentation](https://www.scaleway.com/e
The following command allows you to add a CRON trigger to a Serverless Container.

```terraform
resource scaleway_container_namespace main {
resource "scaleway_container_namespace" "main" {
}

resource scaleway_container main {
resource "scaleway_container" "main" {
name = "my-container-with-cron-tf"
namespace_id = scaleway_container_namespace.main.id
}

resource scaleway_container_cron main {
resource "scaleway_container_cron" "main" {
container_id = scaleway_container.main.id
name = "my-cron-name"
schedule = "5 4 1 * *" #cron at 04:05 on day-of-month 1
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/container_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The commands below shows how to bind a custom domain name to a container.
### Simple

```terraform
resource scaleway_container app {}
resource "scaleway_container" "app" {}

resource scaleway_container_domain "app" {
container_id = scaleway_container.app.id
Expand All @@ -27,12 +27,12 @@ resource scaleway_container_domain "app" {
### Complete example with domain

```terraform
resource scaleway_container_namespace main {
resource "scaleway_container_namespace" "main" {
name = "my-ns-test"
description = "test container"
}

resource scaleway_container app {
resource "scaleway_container" "app" {
name = "app"
namespace_id = scaleway_container_namespace.main.id
registry_image = "${scaleway_container_namespace.main.registry_endpoint}/nginx:alpine"
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/container_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ Refer to the Containers tokens [documentation](https://www.scaleway.com/en/docs/
## Example Usage

```terraform
resource scaleway_container_namespace main {
resource "scaleway_container_namespace" "main" {
name = "test-container-token-ns"
}

resource scaleway_container main {
resource "scaleway_container" "main" {
namespace_id = scaleway_container_namespace.main.id
}

// Namespace Token
resource scaleway_container_token namespace {
resource "scaleway_container_token" "namespace" {
namespace_id = scaleway_container_namespace.main.id
expires_at = "2022-10-18T11:35:15+02:00"
}

// Container Token
resource scaleway_container_token container {
resource "scaleway_container_token" "container" {
container_id = scaleway_container.main.id
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/container_trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Refer to the Containers triggers [documentation](https://www.scaleway.com/en/doc
### SQS

```terraform
resource scaleway_container_trigger main {
resource "scaleway_container_trigger" "main" {
container_id = scaleway_container.main.id
name = "my-trigger"
sqs {
Expand All @@ -29,7 +29,7 @@ resource scaleway_container_trigger main {
### NATS

```terraform
resource scaleway_container_trigger main {
resource "scaleway_container_trigger" "main" {
container_id = scaleway_container.main.id
name = "my-trigger"
nats {
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/function.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "scaleway_function_namespace" "main" {
description = "Main function namespace"
}
resource scaleway_function main {
resource "scaleway_function" "main" {
namespace_id = scaleway_function_namespace.main.id
runtime = "go118"
handler = "Handle"
Expand All @@ -39,7 +39,7 @@ resource "scaleway_function_namespace" "main" {
description = "Main function namespace"
}
resource scaleway_function main {
resource "scaleway_function" "main" {
namespace_id = scaleway_function_namespace.main.id
runtime = "go118"
handler = "Handle"
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/function_cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ Refer to the Functions CRON triggers [documentation](https://www.scaleway.com/en
The following command allows you to add a CRON trigger to a Serverless Function.

```terraform
resource scaleway_function_namespace main {
resource "scaleway_function_namespace" "main" {
name = "test-cron"
}

resource scaleway_function main {
resource "scaleway_function" "main" {
name = "test-cron"
namespace_id = scaleway_function_namespace.main.id
runtime = "node14"
privacy = "private"
handler = "handler.handle"
}

resource scaleway_function_cron main {
resource "scaleway_function_cron" "main" {
name = "test-cron"
function_id = scaleway_function.main.id
schedule = "0 0 * * *"
args = jsonencode({ test = "scw" })
}

resource scaleway_function_cron func {
resource "scaleway_function_cron" "func" {
function_id = scaleway_function.main.id
schedule = "0 1 * * *"
args = jsonencode({ my_var = "terraform" })
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/function_domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ resource "scaleway_function_domain" "main" {
]
}
resource scaleway_function_namespace main {}
resource "scaleway_function_namespace" "main" {}
resource scaleway_function main {
resource "scaleway_function" "main" {
namespace_id = scaleway_function_namespace.main.id
runtime = "go118"
privacy = "private"
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/function_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ Refer to the Functions tokens [documentation](https://www.scaleway.com/en/docs/s
## Example Usage

```terraform
resource scaleway_function_namespace main {
resource "scaleway_function_namespace" "main" {
name = "test-function-token-ns"
}

resource scaleway_function main {
resource "scaleway_function" "main" {
namespace_id = scaleway_function_namespace.main.id
runtime = "go118"
handler = "Handle"
privacy = "private"
}

// Namespace Token
resource scaleway_function_token namespace {
resource "scaleway_function_token" "namespace" {
namespace_id = scaleway_function_namespace.main.id
expires_at = "2022-10-18T11:35:15+02:00"
}

// Function Token
resource scaleway_function_token function {
resource "scaleway_function_token" "function" {
function_id = scaleway_function.main.id
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/function_trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Refer to the Functions triggers [documentation](https://www.scaleway.com/en/docs
### SQS

```terraform
resource scaleway_function_trigger main {
resource "scaleway_function_trigger" "main" {
function_id = scaleway_function.main.id
name = "my-trigger"
sqs {
Expand All @@ -29,7 +29,7 @@ resource scaleway_function_trigger main {
### NATS

```terraform
resource scaleway_function_trigger main {
resource "scaleway_function_trigger" "main" {
function_id = scaleway_function.main.id
name = "my-trigger"
nats {
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ resource "scaleway_instance_server" "web" {
### With private network

```terraform
resource scaleway_vpc_private_network pn01 {
resource "scaleway_vpc_private_network" "pn01" {
name = "private_network_instance"
}

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/instance_user_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "scaleway_instance_user_data" "main" {
}
# User Data with many keys.
resource scaleway_instance_user_data data {
resource "scaleway_instance_user_data" "data" {
server_id = scaleway_instance_server.main.id
for_each = var.user_data
key = each.key
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/job_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Creates and manages a Scaleway Serverless Job Definition. For more information,
### Basic

```terraform
resource scaleway_job_definition main {
resource "scaleway_job_definition" "main" {
name = "testjob"
cpu_limit = 140
memory_limit = 256
Expand All @@ -34,7 +34,7 @@ resource scaleway_job_definition main {
### With Secret Reference

```terraform
resource scaleway_job_definition main {
resource "scaleway_job_definition" "main" {
name = "testjob"
cpu_limit = 140
memory_limit = 256
Expand Down
Loading
Loading