import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Unit is the fundamental structural building block of a SaaS offering. Each Unit is an instance of a UnitKind. It is a versioned, manageable component of a service that has its own lifecycle, representing elements like infrastructure, workloads, or an entire application stack that a service producer intends to manage as a single entity. * * ## Example Usage * * ### Saas Runtime Unit Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const exampleSaasRegional = new gcp.saasruntime.SaaS("example_saas_regional", { * saasId: "example-saas", * location: "us-central1", * locations: [{ * name: "us-central1", * }], * }); * const exampleUnitKind = new gcp.saasruntime.UnitKind("example_unit_kind", { * location: "us-central1", * unitKindId: "example-unitkind", * saas: exampleSaasRegional.id, * }); * const example = new gcp.saasruntime.Unit("example", { * location: "us-central1", * unitId: "example-unit", * unitKind: exampleUnitKind.id, * managementMode: "MANAGEMENT_MODE_USER", * }); * ``` * * ## Import * * Unit can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/units/{{unit_id}}` * * `{{project}}/{{location}}/{{unit_id}}` * * `{{location}}/{{unit_id}}` * * When using the `pulumi import` command, Unit can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:saasruntime/unit:Unit default projects/{{project}}/locations/{{location}}/units/{{unit_id}} * $ pulumi import gcp:saasruntime/unit:Unit default {{project}}/{{location}}/{{unit_id}} * $ pulumi import gcp:saasruntime/unit:Unit default {{location}}/{{unit_id}} * ``` */ export declare class Unit extends pulumi.CustomResource { /** * Get an existing Unit 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?: UnitState, opts?: pulumi.CustomResourceOptions): Unit; /** * Returns true if the given object is an instance of Unit. 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 Unit; /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ readonly annotations: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A set of conditions which indicate the various conditions this resource can * have. * Structure is documented below. */ readonly conditions: pulumi.Output; /** * The timestamp when the resource was created. */ readonly createTime: pulumi.Output; /** * Set of dependencies for this unit. Maximum 10. * Structure is documented below. */ readonly dependencies: pulumi.Output; /** * List of Units that depend on this unit. Unit can only be deprovisioned if * this list is empty. Maximum 1000. * Structure is documented below. */ readonly dependents: pulumi.Output; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ readonly effectiveAnnotations: pulumi.Output<{ [key: string]: string; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ readonly effectiveLabels: pulumi.Output<{ [key: string]: string; }>; /** * Indicates the current input variables deployed by the unit * Structure is documented below. */ readonly inputVariables: pulumi.Output; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ readonly labels: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ readonly location: pulumi.Output; /** * Captures requested directives for performing future maintenance on the * unit. This includes a request for the unit to skip maintenance for a period * of time and remain pinned to its current release as well as controls for * postponing maintenance scheduled in future. * Structure is documented below. */ readonly maintenance: pulumi.Output; /** * Indicates whether the Unit life cycle is controlled * by the user or by the system. * Immutable once created. * Possible values: * MANAGEMENT_MODE_USER * MANAGEMENT_MODE_SYSTEM */ readonly managementMode: pulumi.Output; /** * Identifier. The resource name (full URI of the resource) following the standard naming * scheme: * "projects/{project}/locations/{location}/units/{unit}" */ readonly name: pulumi.Output; /** * List of concurrent UnitOperations that are operating on this Unit. */ readonly ongoingOperations: pulumi.Output; /** * Set of key/value pairs corresponding to output variables from execution of * actuation templates. The variables are declared in actuation configs (e.g * in helm chart or terraform) and the values are fetched and returned by the * actuation engine upon completion of execution. * Structure is documented below. */ readonly outputVariables: pulumi.Output; /** * List of pending (wait to be executed) UnitOperations for this unit. */ readonly pendingOperations: 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ readonly pulumiLabels: pulumi.Output<{ [key: string]: string; }>; /** * The current Release object for this Unit. */ readonly release: pulumi.Output; /** * List of scheduled UnitOperations for this unit. */ readonly scheduledOperations: pulumi.Output; /** * Current lifecycle state of the resource (e.g. if it's being * created or ready to use). * Possible values: * UNIT_STATE_NOT_PROVISIONED * UNIT_STATE_PROVISIONING * UNIT_STATE_UPDATING * UNIT_STATE_DEPROVISIONING * UNIT_STATE_READY * UNIT_STATE_ERROR */ readonly state: pulumi.Output; /** * If set, indicates the time when the system will start removing the unit. */ readonly systemCleanupAt: pulumi.Output; /** * Indicates the system managed state of the unit. * Possible values: * SYSTEM_MANAGED_STATE_ACTIVE * SYSTEM_MANAGED_STATE_INACTIVE * SYSTEM_MANAGED_STATE_DECOMMISSIONED */ readonly systemManagedState: pulumi.Output; /** * Reference to the Saas Tenant resource this unit belongs to. This for * example informs the maintenance policies to use for scheduling future * updates on a unit. (optional and immutable once created) */ readonly tenant: pulumi.Output; /** * The unique identifier of the resource. UID is unique in the time * and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource * and must not be changed. UID is used to uniquely identify resources * with resource name reuses. This should be a UUID4. */ readonly uid: pulumi.Output; /** * The ID value for the new unit. */ readonly unitId: pulumi.Output; /** * Reference to the UnitKind this Unit belongs to. Immutable once set. */ readonly unitKind: pulumi.Output; /** * The timestamp when the resource was last updated. Any * change to the resource made by users must refresh this value. * Changes to a resource made by the service should refresh this value. */ readonly updateTime: pulumi.Output; /** * Create a Unit 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: UnitArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Unit resources. */ export interface UnitState { /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * A set of conditions which indicate the various conditions this resource can * have. * Structure is documented below. */ conditions?: pulumi.Input[]>; /** * The timestamp when the resource was created. */ createTime?: pulumi.Input; /** * Set of dependencies for this unit. Maximum 10. * Structure is documented below. */ dependencies?: pulumi.Input[]>; /** * List of Units that depend on this unit. Unit can only be deprovisioned if * this list is empty. Maximum 1000. * Structure is documented below. */ dependents?: pulumi.Input[]>; /** * All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. */ effectiveAnnotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services. */ effectiveLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Indicates the current input variables deployed by the unit * Structure is documented below. */ inputVariables?: pulumi.Input[]>; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location?: pulumi.Input; /** * Captures requested directives for performing future maintenance on the * unit. This includes a request for the unit to skip maintenance for a period * of time and remain pinned to its current release as well as controls for * postponing maintenance scheduled in future. * Structure is documented below. */ maintenance?: pulumi.Input; /** * Indicates whether the Unit life cycle is controlled * by the user or by the system. * Immutable once created. * Possible values: * MANAGEMENT_MODE_USER * MANAGEMENT_MODE_SYSTEM */ managementMode?: pulumi.Input; /** * Identifier. The resource name (full URI of the resource) following the standard naming * scheme: * "projects/{project}/locations/{location}/units/{unit}" */ name?: pulumi.Input; /** * List of concurrent UnitOperations that are operating on this Unit. */ ongoingOperations?: pulumi.Input[]>; /** * Set of key/value pairs corresponding to output variables from execution of * actuation templates. The variables are declared in actuation configs (e.g * in helm chart or terraform) and the values are fetched and returned by the * actuation engine upon completion of execution. * Structure is documented below. */ outputVariables?: pulumi.Input[]>; /** * List of pending (wait to be executed) UnitOperations for this unit. */ pendingOperations?: 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 combination of labels configured directly on the resource * and default labels configured on the provider. */ pulumiLabels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The current Release object for this Unit. */ release?: pulumi.Input; /** * List of scheduled UnitOperations for this unit. */ scheduledOperations?: pulumi.Input[]>; /** * Current lifecycle state of the resource (e.g. if it's being * created or ready to use). * Possible values: * UNIT_STATE_NOT_PROVISIONED * UNIT_STATE_PROVISIONING * UNIT_STATE_UPDATING * UNIT_STATE_DEPROVISIONING * UNIT_STATE_READY * UNIT_STATE_ERROR */ state?: pulumi.Input; /** * If set, indicates the time when the system will start removing the unit. */ systemCleanupAt?: pulumi.Input; /** * Indicates the system managed state of the unit. * Possible values: * SYSTEM_MANAGED_STATE_ACTIVE * SYSTEM_MANAGED_STATE_INACTIVE * SYSTEM_MANAGED_STATE_DECOMMISSIONED */ systemManagedState?: pulumi.Input; /** * Reference to the Saas Tenant resource this unit belongs to. This for * example informs the maintenance policies to use for scheduling future * updates on a unit. (optional and immutable once created) */ tenant?: pulumi.Input; /** * The unique identifier of the resource. UID is unique in the time * and space for this resource within the scope of the service. It is * typically generated by the server on successful creation of a resource * and must not be changed. UID is used to uniquely identify resources * with resource name reuses. This should be a UUID4. */ uid?: pulumi.Input; /** * The ID value for the new unit. */ unitId?: pulumi.Input; /** * Reference to the UnitKind this Unit belongs to. Immutable once set. */ unitKind?: pulumi.Input; /** * The timestamp when the resource was last updated. Any * change to the resource made by users must refresh this value. * Changes to a resource made by the service should refresh this value. */ updateTime?: pulumi.Input; } /** * The set of arguments for constructing a Unit resource. */ export interface UnitArgs { /** * Annotations is an unstructured key-value map stored with a resource that * may be set by external tools to store and retrieve arbitrary metadata. * They are not queryable and should be preserved when modifying objects. * More info: https://kubernetes.io/docs/user-guide/annotations * **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. * Please refer to the field `effectiveAnnotations` for all of the annotations present on the resource. */ annotations?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The labels on the resource, which can be used for categorization. * similar to Kubernetes resource labels. * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. * Please refer to the field `effectiveLabels` for all of the labels present on the resource. */ labels?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */ location: pulumi.Input; /** * Captures requested directives for performing future maintenance on the * unit. This includes a request for the unit to skip maintenance for a period * of time and remain pinned to its current release as well as controls for * postponing maintenance scheduled in future. * Structure is documented below. */ maintenance?: pulumi.Input; /** * Indicates whether the Unit life cycle is controlled * by the user or by the system. * Immutable once created. * Possible values: * MANAGEMENT_MODE_USER * MANAGEMENT_MODE_SYSTEM */ managementMode?: 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; /** * Reference to the Saas Tenant resource this unit belongs to. This for * example informs the maintenance policies to use for scheduling future * updates on a unit. (optional and immutable once created) */ tenant?: pulumi.Input; /** * The ID value for the new unit. */ unitId: pulumi.Input; /** * Reference to the UnitKind this Unit belongs to. Immutable once set. */ unitKind?: pulumi.Input; }