UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

260 lines 11 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * The scaleway.inference.Model resource allows you to upload and manage inference models in the Scaleway Inference ecosystem. Once registered, a model can be used in any scaleway.inference.Deployment resource. * * > **Security Best Practice:** * For enhanced security, we recommend using the `secretWo` write-only argument instead of the regular `secret` argument. This ensures your sensitive credentials are never stored in Terraform state files, providing superior protection against accidental exposure. Write-Only arguments are supported in Terraform 1.11.0 and later. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * //## Basic creation of an inference model * const test = new scaleway.inference.Model("test", { * name: "my-awesome-model", * url: "https://huggingface.co/agentica-org/DeepCoder-14B-Preview", * secret: "my-secret-token", * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * //## Deploy your own model on your managed inference * const myModel = new scaleway.inference.Model("my_model", { * name: "my-awesome-model", * url: "https://huggingface.co/agentica-org/DeepCoder-14B-Preview", * secret: "my-secret-token", * }); * const myDeployment = new scaleway.inference.Deployment("my_deployment", { * name: "test-inference-deployment-basic", * nodeType: "H100", * modelId: myModel.id, * publicEndpoint: { * isEnabled: true, * }, * acceptEula: true, * }); * ``` * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * //## Create a model using your model's secret token without storing it in the state * const myModelWo = new scaleway.inference.Model("my_model_wo", { * name: "my-awesome-model-wo", * url: "https://huggingface.co/agentica-org/DeepCoder-14B-Preview", * secretWo: "my-secret-token", * secretWoVersion: 1, * }); * ``` * * ## Import * * Models can be imported using, `{region}/{id}`, as shown below: * * ```sh * $ pulumi import scaleway:inference/model:Model my_model fr-par/11111111-1111-1111-1111-111111111111 * ``` */ export declare class Model extends pulumi.CustomResource { /** * Get an existing Model resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ModelState, opts?: pulumi.CustomResourceOptions): Model; /** * Returns true if the given object is an instance of Model. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Model; /** * The date and time of the creation of the model */ readonly createdAt: pulumi.Output<string>; /** * A textual description of the model (if available). */ readonly description: pulumi.Output<string>; /** * Whether the model requires end-user license agreement acceptance before use. */ readonly hasEula: pulumi.Output<boolean>; /** * The name of the model. This must be unique within the project. */ readonly name: pulumi.Output<string>; /** * List of supported node types and their quantization options. Each entry contains: */ readonly nodesSupports: pulumi.Output<outputs.inference.ModelNodesSupport[]>; /** * Size, in bits, of the model parameters. */ readonly parameterSizeBits: pulumi.Output<number>; /** * `projectId`) The ID of the project the deployment is associated with. */ readonly projectId: pulumi.Output<string>; /** * `region`) The region in which the deployment is created. */ readonly region: pulumi.Output<string | undefined>; /** * Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission). Conflicts with `secretWo`. */ readonly secret: pulumi.Output<string | undefined>; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Authentication token used to pull the model from a private or gated URL in write-only mode. `secretWo` will not be stored in the Terraform state. Only one of `secret` or `secretWo` should be specified. Requires `secretWoVersion` to be set. */ readonly secretWo: pulumi.Output<string | undefined>; /** * The version of the write-only secret. Required when using `secretWo`. */ readonly secretWoVersion: pulumi.Output<number | undefined>; /** * Total size, in bytes, of the model archive. */ readonly sizeBytes: pulumi.Output<number>; /** * The current status of the model (e.g., ready, error, etc.). */ readonly status: pulumi.Output<string>; /** * Tags associated with the model. */ readonly tags: pulumi.Output<string[]>; /** * The date and time of the last update of the model */ readonly updatedAt: pulumi.Output<string>; /** * The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., <https://huggingface.co/agentica-org/DeepCoder-14B-Preview>). The URL must be publicly accessible or require valid credentials via `secret` or `secretWo` */ readonly url: pulumi.Output<string>; /** * Create a Model resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Model resources. */ export interface ModelState { /** * The date and time of the creation of the model */ createdAt?: pulumi.Input<string | undefined>; /** * A textual description of the model (if available). */ description?: pulumi.Input<string | undefined>; /** * Whether the model requires end-user license agreement acceptance before use. */ hasEula?: pulumi.Input<boolean | undefined>; /** * The name of the model. This must be unique within the project. */ name?: pulumi.Input<string | undefined>; /** * List of supported node types and their quantization options. Each entry contains: */ nodesSupports?: pulumi.Input<pulumi.Input<inputs.inference.ModelNodesSupport>[] | undefined>; /** * Size, in bits, of the model parameters. */ parameterSizeBits?: pulumi.Input<number | undefined>; /** * `projectId`) The ID of the project the deployment is associated with. */ projectId?: pulumi.Input<string | undefined>; /** * `region`) The region in which the deployment is created. */ region?: pulumi.Input<string | undefined>; /** * Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission). Conflicts with `secretWo`. */ secret?: pulumi.Input<string | undefined>; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Authentication token used to pull the model from a private or gated URL in write-only mode. `secretWo` will not be stored in the Terraform state. Only one of `secret` or `secretWo` should be specified. Requires `secretWoVersion` to be set. */ secretWo?: pulumi.Input<string | undefined>; /** * The version of the write-only secret. Required when using `secretWo`. */ secretWoVersion?: pulumi.Input<number | undefined>; /** * Total size, in bytes, of the model archive. */ sizeBytes?: pulumi.Input<number | undefined>; /** * The current status of the model (e.g., ready, error, etc.). */ status?: pulumi.Input<string | undefined>; /** * Tags associated with the model. */ tags?: pulumi.Input<pulumi.Input<string>[] | undefined>; /** * The date and time of the last update of the model */ updatedAt?: pulumi.Input<string | undefined>; /** * The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., <https://huggingface.co/agentica-org/DeepCoder-14B-Preview>). The URL must be publicly accessible or require valid credentials via `secret` or `secretWo` */ url?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a Model resource. */ export interface ModelArgs { /** * The name of the model. This must be unique within the project. */ name?: pulumi.Input<string | undefined>; /** * `projectId`) The ID of the project the deployment is associated with. */ projectId?: pulumi.Input<string | undefined>; /** * `region`) The region in which the deployment is created. */ region?: pulumi.Input<string | undefined>; /** * Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission). Conflicts with `secretWo`. */ secret?: pulumi.Input<string | undefined>; /** * **NOTE:** This field is write-only and its value will not be updated in state as part of read operations. * Authentication token used to pull the model from a private or gated URL in write-only mode. `secretWo` will not be stored in the Terraform state. Only one of `secret` or `secretWo` should be specified. Requires `secretWoVersion` to be set. */ secretWo?: pulumi.Input<string | undefined>; /** * The version of the write-only secret. Required when using `secretWo`. */ secretWoVersion?: pulumi.Input<number | undefined>; /** * The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., <https://huggingface.co/agentica-org/DeepCoder-14B-Preview>). The URL must be publicly accessible or require valid credentials via `secret` or `secretWo` */ url: pulumi.Input<string>; } //# sourceMappingURL=model.d.ts.map