Skip to content

Commit ce786e2

Browse files
authored
Merge branch 'master' into fix-test-baremetal
2 parents 6cb6192 + e6717c2 commit ce786e2

Some content is hidden

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

47 files changed

+65897
-70
lines changed

.github/workflows/acceptance-tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ jobs:
2323
- function
2424
- iam
2525
- instance
26+
- inference
2627
- iot
2728
- ipam
2829
- jobs
2930
- k8s
3031
- lb
3132
- marketplace
3233
- mnq
34+
- mongodb
3335
- object
3436
- rdb
3537
- redis

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- flexibleip
2424
- function
2525
- iam
26+
- inference
2627
- instance
2728
- iot
2829
- ipam
@@ -31,6 +32,7 @@ jobs:
3132
- lb
3233
- marketplace
3334
- mnq
35+
- mongodb
3436
- object
3537
- rdb
3638
- redis

cmd/tftemplate/models/resource.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package models
22

33
import (
4-
"golang.org/x/text/cases"
5-
"golang.org/x/text/language"
64
"strings"
75
"unicode"
6+
7+
"golang.org/x/text/cases"
8+
"golang.org/x/text/language"
89
)
910

1011
type ResourceTemplate struct {

cmd/tftemplate/templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"log"
55
"os"
6+
"strings"
67
"text/template"
78

8-
"strings"
99
"tftemplate/models"
1010
)
1111

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
subcategory: "MongoDB®"
3+
page_title: "Scaleway: scaleway_mongodb_instance"
4+
---
5+
6+
# scaleway_mongodb_instance
7+
8+
Gets information about a MongoDB® Instance.
9+
10+
For further information refer to the Managed Databases for MongoDB® [API documentation](https://developers.scaleway.com/en/products/mongodb/api/)
11+
12+
## Example Usage
13+
14+
```hcl
15+
# Get info by name
16+
data "scaleway_mongodb_instance" "my_instance" {
17+
name = "foobar"
18+
}
19+
20+
# Get info by instance ID
21+
data "scaleway_mongodb_instance" "my_instance" {
22+
instance_id = "11111111-1111-1111-1111-111111111111"
23+
}
24+
25+
# Get other attributes
26+
output "mongodb_version" {
27+
description = "Version of the MongoDB instance"
28+
value = data.scaleway_mongodb_instance.my_instance.version
29+
}
30+
```
31+
32+
## Argument Reference
33+
34+
- `name` - (Optional) The name of the MongoDB® instance.
35+
36+
- `instance_id` - (Optional) The MongoDB® instance ID.
37+
38+
-> **Note** You must specify at least one: `name` or `instance_id`.
39+
40+
- `project_id` - (Optional) The ID of the project the MongoDB® instance is in. Can be used to filter instances when using `name`.
41+
42+
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#zones) in which the MongoDB® Instance exists.
43+
44+
- `organization_id` - (Defaults to [provider](../index.md#organization_id) `organization_id`) The ID of the organization the MongoDB® instance is in.
45+
46+
## Attributes Reference
47+
48+
In addition to all above arguments, the following attributes are exported:
49+
50+
- `id` - The ID of the MongoDB® Instance.
51+
- `name` - The name of the MongoDB® instance.
52+
- `version` - The version of MongoDB® running on the instance.
53+
- `node_type` - The type of MongoDB® node.
54+
- `node_number` - The number of nodes in the MongoDB® cluster.
55+
- `created_at` - The date and time the MongoDB® instance was created.
56+
- `project_id` - The ID of the project the instance belongs to.
57+
- `tags` - A list of tags attached to the MongoDB® instance.
58+
- `volume_type` - The type of volume attached to the MongoDB® instance.
59+
- `volume_size_in_gb` - The size of the attached volume, in GB.
60+
- `public_network` - The details of the public network configuration, if applicable.
61+
62+
## Import
63+
64+
MongoDB® instance can be imported using the `id`, e.g.
65+
66+
```bash
67+
terraform import scaleway_mongodb_instance.main fr-par-1/11111111-1111-1111-1111-111111111111
68+
```
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
subcategory: "Inference"
3+
page_title: "Scaleway: scaleway_inference_deployment"
4+
---
5+
6+
# Resource: scaleway_inference_deployment
7+
8+
Creates and manages Scaleway Managed Inference deployments.
9+
For more information, see [the documentation](https://www.scaleway.com/en/developers/api/inference/).
10+
11+
## Example Usage
12+
13+
### Basic
14+
15+
```terraform
16+
resource "scaleway_inference_deployment" "deployment" {
17+
name = "tf-inference-deployment"
18+
node_type = "L4"
19+
model_name = "meta/llama-3.1-8b-instruct:fp8"
20+
public_endpoint {
21+
is_enabled = true
22+
}
23+
accept_eula = true
24+
}
25+
```
26+
27+
## Argument Reference
28+
29+
- `model_name` - (Required) The model name to use for the deployment. Model names can be found in Console or using Scaleway's CLI (`scw inference model list`)
30+
- `node_type` - (Required) The node type to use for the deployment. Node types can be found using Scaleway's CLI (`scw inference node-type list`)
31+
- `name` - (Optional) The deployment name.
32+
- `accept_eula` - (Optional) Some models (e.g Meta Llama) require end-user license agreements. Set `true` to accept.
33+
- `tags` - (Optional) The tags associated with the deployment.
34+
- `min_size` - (Optional) The minimum size of the pool.
35+
- `max_size` - (Optional) The maximum size of the pool.
36+
- `private_endpoint` - (Optional) Configuration of the deployment's private endpoint.
37+
- `private_network_id` - (Optional) The ID of the private network to use.
38+
- `disable_auth` - (Optional) Disable the authentication on the endpoint.
39+
- `public_endpoint` - (Optional) Configuration of the deployment's public endpoint.
40+
- `is_enabled` - (Optional) Enable or disable public endpoint.
41+
- `disable_auth` - (Optional) Disable the authentication on the endpoint.
42+
43+
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) in which the deployment is created.
44+
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the deployment is associated with.
45+
46+
## Attributes Reference
47+
48+
In addition to all arguments above, the following attributes are exported:
49+
50+
- `id` - The ID of the deployment.
51+
- `model_id` - The model id used for the deployment.
52+
- `size` - The size of the pool.
53+
- `status` - The status of the deployment.
54+
- `created_at` - The date and time of the creation of the deployment.
55+
- `updated_at` - The date and time of the last update of the deployment.
56+
- `private_endpoint` - Private endpoint's attributes.
57+
- `id` - (Optional) The id of the private endpoint.
58+
- `url` - (Optional) The URL of the endpoint.
59+
- `public_endpoint` - (Optional) Public endpoint's attributes.
60+
- `id` - (Optional) The id of the public endpoint.
61+
- `url` - (Optional) The URL of the endpoint.
62+
63+
~> **Important:** Deployments' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111`.
64+
65+
66+
## Import
67+
68+
Functions can be imported using, `{region}/{id}`, as shown below:
69+
70+
```bash
71+
terraform import scaleway_inference_deployment.deployment fr-par/11111111-1111-1111-1111-111111111111
72+
```

docs/resources/ipam_ip.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,31 @@ resource "scaleway_ipam_ip" "ip01" {
7676
}
7777
```
7878

79+
### Book an IP for a custom resource
80+
81+
```terraform
82+
resource "scaleway_vpc" "vpc01" {
83+
name = "my vpc"
84+
}
85+
86+
resource "scaleway_vpc_private_network" "pn01" {
87+
vpc_id = scaleway_vpc.vpc01.id
88+
ipv4_subnet {
89+
subnet = "172.16.32.0/22"
90+
}
91+
}
92+
93+
resource "scaleway_ipam_ip" "ip01" {
94+
address = "172.16.32.7"
95+
source {
96+
private_network_id = scaleway_vpc_private_network.pn01.id
97+
}
98+
custom_resource {
99+
mac_address = "bc:24:11:74:d0:6a"
100+
}
101+
}
102+
```
103+
79104
## Argument Reference
80105

81106
The following arguments are supported:
@@ -90,6 +115,9 @@ The following arguments are supported:
90115
- `private_network_id` - The Private Network of the IP (if the IP is a private IP).
91116
- `subnet_id` - The Private Network subnet of the IP (if the IP is a private IP).
92117
- `is_ipv6` - (Optional) Defines whether to request an IPv6 address instead of IPv4.
118+
- `custome_resource` - (Optional) The custom resource to attach to the IP being reserved. An example of a custom resource is a virtual machine hosted on an Elastic Metal server.
119+
- `mac_address` - The MAC address of the custom resource.
120+
- `name` - When the resource is in a Private Network, a DNS record is available to resolve the resource name.
93121
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the IP.
94122
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the Project the IP is associated with.
95123

docs/resources/mongodb_instance.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
subcategory: "MongoDB®"
3+
page_title: "Scaleway: scaleway_mongodb_instance"
4+
---
5+
6+
# Resource: scaleway_mongodb_instance
7+
8+
Creates and manages Scaleway MongoDB® instance.
9+
For more information refer to [the API documentation](https://www.scaleway.com/en/docs/managed-databases/mongodb/).
10+
11+
## Example Usage
12+
13+
### Basic
14+
15+
```terraform
16+
resource "scaleway_mongodb_instance" "main" {
17+
name = "test-mongodb-basic1"
18+
version = "7.0.12"
19+
node_type = "MGDB-PLAY2-NANO"
20+
node_number = 1
21+
user_name = "my_initial_user"
22+
password = "thiZ_is_v&ry_s3cret"
23+
volume_size_in_gb = 5
24+
25+
}
26+
```
27+
28+
29+
### Restore From Snapshot
30+
31+
```terraform
32+
33+
resource "scaleway_mongodb_instance" "restored_instance" {
34+
snapshot_id = "${scaleway_vpc_private_network.pn.idscaleway_mongodb_snapshot.main_snapshot.id}"
35+
name = "restored-mongodb-from-snapshot"
36+
node_type = "MGDB-PLAY2-NANO"
37+
node_number = 1
38+
}
39+
```
40+
41+
## Argument Reference
42+
43+
The following arguments are supported:
44+
45+
- `version` - (Optional) MongoDB® version of the instance.
46+
- `node_type` - (Required) The type of MongoDB® intance to create.
47+
- `user_name` - (Optional) Name of the user created when the intance is created.
48+
- `password` - (Optional) Password of the user.
49+
- `name` - (Optional) Name of the MongoDB® instance.
50+
- `tags` - (Optional) List of tags attached to the MongoDB® instance.
51+
- `volume_type` - (Optional) Volume type of the instance.
52+
- `volume_size_in_gb` - (Optional) Volume size in GB.
53+
- `snapshot_id` - (Optional) Snapshot ID to restore the MongoDB® instance from.
54+
- `public_network` - (Optional) Public network specs details.
55+
56+
## Attributes Reference
57+
58+
In addition to all arguments above, the following attributes are exported:
59+
60+
- `id` - The ID of the MongoDB® instance.
61+
- `created_at` - The date and time of the creation of the MongoDB® instance.
62+
- `updated_at` - The date and time of the last update of the MongoDB® instance.
63+
64+
## Import
65+
66+
MongoDB® instance can be imported using the `id`, e.g.
67+
68+
```bash
69+
terraform import scaleway_mongodb_instance.main fr-par-1/11111111-1111-1111-1111-111111111111
70+
```

docs/resources/mongodb_snapshot.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
subcategory: "MongoDB®"
3+
page_title: "Scaleway: scaleway_mongodb_snapshot"
4+
---
5+
6+
# Resource: scaleway_mongodb_snapshot
7+
8+
Creates and manages Scaleway MongoDB® snapshots.
9+
For more information refer to [the API documentation](https://www.scaleway.com/en/docs/managed-databases/mongodb/).
10+
11+
## Example Usage
12+
13+
14+
```terraform
15+
16+
resource "scaleway_mongodb_snapshot" "main" {
17+
instance_id = "${scaleway_mongodb_instance.main.id}"
18+
name = "name-snapshot"
19+
expires_at = "2024-12-31T23:59:59Z"
20+
}
21+
```
22+
23+
24+
## Argument Reference
25+
26+
The following arguments are supported:
27+
28+
- `instance_id` - (Required) The ID of the MongoDB® instance from which the snapshot was created.
29+
30+
- `name` - (Optional) The name of the MongoDB® snapshot.
31+
32+
- `expires_at` - (Required) The expiration date of the MongoDB® snapshot in ISO 8601 format (e.g. `2024-12-31T23:59:59Z`).
33+
34+
~> **Important:** Once set, `expires_at` cannot be removed.
35+
36+
- `region` - (Defaults to [provider](../index.md) `region`) The [region](../guides/regions_and_zones.md#regions) in which the MongoDB® snapshot should be created.
37+
38+
## Attributes Reference
39+
40+
In addition to all arguments above, the following attributes are exported:
41+
42+
- `id` - The ID of the snapshot.
43+
44+
- `instance_name` - The name of the MongoDB® instance from which the snapshot was created.
45+
46+
- `size` - The size of the MongoDB® snapshot in bytes.
47+
48+
- `node_type` - The type of node associated with the MongoDB® snapshot.
49+
50+
- `volume_type` - The type of volume used for the MongoDB® snapshot.
51+
52+
- `created_at` - The date and time when the MongoDB® snapshot was created.
53+
54+
- `updated_at` - The date and time of the last update of the MongoDB® snapshot.
55+
56+
## Import
57+
58+
MongoDB® snapshots can be imported using the `{region}/{id}`, e.g.
59+
60+
```bash
61+
terraform import scaleway_mongodb_snapshot.main fr-par-1/11111111-1111-1111-1111-111111111111
62+
```

docs/resources/object_bucket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ If you make any change to your bucket's tags using the console, it will overwrit
141141
* `expose_headers` (Optional) Specifies header exposure in the response.
142142
* `max_age_seconds` (Optional) Specifies time in seconds that the browser can cache the response for a preflight request.
143143

144-
* `force_destroy` - (Optional) Enable deletion of objects in the bucket before destroying, locked objects or under legal hold are also deleted and **not** recoverable
144+
* `force_destroy` - (Optional) Whether to allow the object to be deleted by removing any legal hold on any object version. Default is false. This value should be set to true only if the bucket has object lock enabled.
145145

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

0 commit comments

Comments
 (0)