Skip to content

Commit 6f685b5

Browse files
authored
Merge branch 'master' into feat/add_support_for_mondoDB
2 parents fca955e + cd3bebe commit 6f685b5

File tree

19 files changed

+6255
-11
lines changed

19 files changed

+6255
-11
lines changed

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: 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/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

internal/provider/provider.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/flexibleip"
2424
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/function"
2525
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iam"
26+
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/inference"
2627
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/instance"
2728
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/iot"
2829
"github.com/scaleway/terraform-provider-scaleway/v2/internal/services/ipam"
@@ -151,6 +152,7 @@ func Provider(config *Config) plugin.ProviderFunc {
151152
"scaleway_iam_policy": iam.ResourcePolicy(),
152153
"scaleway_iam_ssh_key": iam.ResourceSSKKey(),
153154
"scaleway_iam_user": iam.ResourceUser(),
155+
"scaleway_inference_deployment": inference.ResourceDeployment(),
154156
"scaleway_instance_image": instance.ResourceImage(),
155157
"scaleway_instance_ip": instance.ResourceIP(),
156158
"scaleway_instance_ip_reverse_dns": instance.ResourceIPReverseDNS(),

0 commit comments

Comments
 (0)