Skip to content

Commit 74ade4e

Browse files
authored
Merge branch 'master' into inference-activate-nightly
2 parents 23a005e + cd3bebe commit 74ade4e

File tree

13 files changed

+4095
-3
lines changed

13 files changed

+4095
-3
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+
```

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"
@@ -150,6 +151,7 @@ func Provider(config *Config) plugin.ProviderFunc {
150151
"scaleway_iam_policy": iam.ResourcePolicy(),
151152
"scaleway_iam_ssh_key": iam.ResourceSSKKey(),
152153
"scaleway_iam_user": iam.ResourceUser(),
154+
"scaleway_inference_deployment": inference.ResourceDeployment(),
153155
"scaleway_instance_image": instance.ResourceImage(),
154156
"scaleway_instance_ip": instance.ResourceIP(),
155157
"scaleway_instance_ip_reverse_dns": instance.ResourceIPReverseDNS(),

0 commit comments

Comments
 (0)