import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Represents a Regional Managed Instance Group Resize Request * * Resize Requests are the Managed Instance Group implementation of Dynamic Workload Scheduler Flex Start. * * With Dynamic Workload Scheduler in Flex Start mode, you submit a GPU capacity request for your AI/ML jobs by indicating how many you need, a duration, and your preferred region. Dynamic Workload Scheduler intelligently persists the request; once the capacity becomes available, it automatically provisions your VMs enabling your workloads to run continuously for the entire duration of the capacity allocation. * * To get more information about RegionResizeRequest, see: * * * [API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/regionInstanceGroupManagerResizeRequests) * * How-to Guides * * [About resize requests in a MIG](https://cloud.google.com/compute/docs/instance-groups/about-resize-requests-mig) * * ## Example Usage * * ### Compute Rmig Resize Request * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const a3Dws = new gcp.compute.RegionInstanceTemplate("a3_dws", { * name: "a3-dws", * region: "us-central1", * description: "This template is used to create a mig instance that is compatible with DWS resize requests.", * instanceDescription: "A3 GPU", * machineType: "a3-highgpu-8g", * canIpForward: false, * scheduling: { * automaticRestart: false, * onHostMaintenance: "TERMINATE", * }, * disks: [{ * sourceImage: "cos-cloud/cos-121-lts", * autoDelete: true, * boot: true, * diskType: "pd-ssd", * diskSizeGb: 960, * mode: "READ_WRITE", * }], * guestAccelerators: [{ * type: "nvidia-h100-80gb", * count: 8, * }], * reservationAffinity: { * type: "NO_RESERVATION", * }, * shieldedInstanceConfig: { * enableVtpm: true, * enableIntegrityMonitoring: true, * }, * networkInterfaces: [{ * network: "default", * }], * }); * const a3DwsRegionInstanceGroupManager = new gcp.compute.RegionInstanceGroupManager("a3_dws", { * name: "a3-dws", * baseInstanceName: "a3-dws", * region: "us-central1", * versions: [{ * instanceTemplate: a3Dws.selfLink, * }], * instanceLifecyclePolicy: { * defaultActionOnFailure: "DO_NOTHING", * }, * distributionPolicyTargetShape: "ANY_SINGLE_ZONE", * distributionPolicyZones: [ * "us-central1-a", * "us-central1-b", * "us-central1-c", * "us-central1-f", * ], * updatePolicy: { * instanceRedistributionType: "NONE", * type: "OPPORTUNISTIC", * minimalAction: "REPLACE", * maxSurgeFixed: 0, * maxUnavailableFixed: 6, * }, * waitForInstances: false, * }); * const a3ResizeRequest = new gcp.compute.RegionResizeRequest("a3_resize_request", { * name: "a3-dws", * instanceGroupManager: a3DwsRegionInstanceGroupManager.name, * region: "us-central1", * description: "Test resize request resource", * resizeBy: 2, * requestedRunDuration: { * seconds: "14400", * nanos: 0, * }, * }); * ``` * * ## Import * * RegionResizeRequest can be imported using any of these accepted formats: * * * `projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{instance_group_manager}}/resizeRequests/{{name}}` * * * `{{project}}/{{region}}/{{instance_group_manager}}/{{name}}` * * * `{{region}}/{{instance_group_manager}}/{{name}}` * * * `{{instance_group_manager}}/{{name}}` * * When using the `pulumi import` command, RegionResizeRequest can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:compute/regionResizeRequest:RegionResizeRequest default projects/{{project}}/regions/{{region}}/instanceGroupManagers/{{instance_group_manager}}/resizeRequests/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/regionResizeRequest:RegionResizeRequest default {{project}}/{{region}}/{{instance_group_manager}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/regionResizeRequest:RegionResizeRequest default {{region}}/{{instance_group_manager}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:compute/regionResizeRequest:RegionResizeRequest default {{instance_group_manager}}/{{name}} * ``` */ export declare class RegionResizeRequest extends pulumi.CustomResource { /** * Get an existing RegionResizeRequest 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, state?: RegionResizeRequestState, opts?: pulumi.CustomResourceOptions): RegionResizeRequest; /** * Returns true if the given object is an instance of RegionResizeRequest. 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 RegionResizeRequest; /** * The creation timestamp for this resize request in RFC3339 text format. */ readonly creationTimestamp: pulumi.Output; /** * An optional description of this resize-request. */ readonly description: pulumi.Output; /** * The reference of the regional instance group manager this ResizeRequest is a part of. */ readonly instanceGroupManager: pulumi.Output; /** * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. */ readonly name: pulumi.Output; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output; /** * The reference of the compute region scoping this request. If it is not provided, the provider region is used. */ readonly region: pulumi.Output; /** * Requested run duration for instances that will be created by this request. At the end of the run duration instances will be deleted. * Structure is documented below. */ readonly requestedRunDuration: pulumi.Output; /** * The number of instances to be created by this resize request. The group's target size will be increased by this number. */ readonly resizeBy: pulumi.Output; /** * Current state of the request. */ readonly state: pulumi.Output; /** * Status of the request. * Structure is documented below. */ readonly statuses: pulumi.Output; /** * Create a RegionResizeRequest 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: RegionResizeRequestArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering RegionResizeRequest resources. */ export interface RegionResizeRequestState { /** * The creation timestamp for this resize request in RFC3339 text format. */ creationTimestamp?: pulumi.Input; /** * An optional description of this resize-request. */ description?: pulumi.Input; /** * The reference of the regional instance group manager this ResizeRequest is a part of. */ instanceGroupManager?: pulumi.Input; /** * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The reference of the compute region scoping this request. If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * Requested run duration for instances that will be created by this request. At the end of the run duration instances will be deleted. * Structure is documented below. */ requestedRunDuration?: pulumi.Input; /** * The number of instances to be created by this resize request. The group's target size will be increased by this number. */ resizeBy?: pulumi.Input; /** * Current state of the request. */ state?: pulumi.Input; /** * Status of the request. * Structure is documented below. */ statuses?: pulumi.Input[]>; } /** * The set of arguments for constructing a RegionResizeRequest resource. */ export interface RegionResizeRequestArgs { /** * An optional description of this resize-request. */ description?: pulumi.Input; /** * The reference of the regional instance group manager this ResizeRequest is a part of. */ instanceGroupManager: pulumi.Input; /** * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. */ name?: pulumi.Input; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input; /** * The reference of the compute region scoping this request. If it is not provided, the provider region is used. */ region?: pulumi.Input; /** * Requested run duration for instances that will be created by this request. At the end of the run duration instances will be deleted. * Structure is documented below. */ requestedRunDuration?: pulumi.Input; /** * The number of instances to be created by this resize request. The group's target size will be increased by this number. */ resizeBy: pulumi.Input; }