@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
519 lines • 22.1 kB
TypeScript
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<pulumi.ID>, 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<outputs.saasruntime.UnitCondition[]>;
/**
* The timestamp when the resource was created.
*/
readonly createTime: pulumi.Output<string>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
readonly deletionPolicy: pulumi.Output<string>;
/**
* Set of dependencies for this unit. Maximum 10.
* Structure is documented below.
*/
readonly dependencies: pulumi.Output<outputs.saasruntime.UnitDependency[]>;
/**
* 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<outputs.saasruntime.UnitDependent[]>;
/**
* 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<outputs.saasruntime.UnitInputVariable[]>;
/**
* 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<string>;
/**
* 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<outputs.saasruntime.UnitMaintenance | undefined>;
/**
* 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<string | undefined>;
/**
* Identifier. The resource name (full URI of the resource) following the standard naming
* scheme:
* "projects/{project}/locations/{location}/units/{unit}"
*/
readonly name: pulumi.Output<string>;
/**
* List of concurrent UnitOperations that are operating on this Unit.
*/
readonly ongoingOperations: pulumi.Output<string[]>;
/**
* 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<outputs.saasruntime.UnitOutputVariable[]>;
/**
* List of pending (wait to be executed) UnitOperations for this unit.
*/
readonly pendingOperations: pulumi.Output<string[]>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project: pulumi.Output<string>;
/**
* 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<string>;
/**
* List of scheduled UnitOperations for this unit.
*/
readonly scheduledOperations: pulumi.Output<string[]>;
/**
* 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<string>;
/**
* If set, indicates the time when the system will start removing the unit.
*/
readonly systemCleanupAt: pulumi.Output<string>;
/**
* 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<string>;
/**
* 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<string | undefined>;
/**
* 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<string>;
/**
* The ID value for the new unit.
*/
readonly unitId: pulumi.Output<string>;
/**
* Reference to the UnitKind this Unit belongs to. Immutable once set.
*/
readonly unitKind: pulumi.Output<string | undefined>;
/**
* 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<string>;
/**
* 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<string>;
} | undefined>;
/**
* A set of conditions which indicate the various conditions this resource can
* have.
* Structure is documented below.
*/
conditions?: pulumi.Input<pulumi.Input<inputs.saasruntime.UnitCondition>[] | undefined>;
/**
* The timestamp when the resource was created.
*/
createTime?: pulumi.Input<string | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* Set of dependencies for this unit. Maximum 10.
* Structure is documented below.
*/
dependencies?: pulumi.Input<pulumi.Input<inputs.saasruntime.UnitDependency>[] | undefined>;
/**
* 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<pulumi.Input<inputs.saasruntime.UnitDependent>[] | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* 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<string>;
} | undefined>;
/**
* Indicates the current input variables deployed by the unit
* Structure is documented below.
*/
inputVariables?: pulumi.Input<pulumi.Input<inputs.saasruntime.UnitInputVariable>[] | undefined>;
/**
* 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<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.
*/
location?: pulumi.Input<string | undefined>;
/**
* 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<inputs.saasruntime.UnitMaintenance | undefined>;
/**
* 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<string | undefined>;
/**
* Identifier. The resource name (full URI of the resource) following the standard naming
* scheme:
* "projects/{project}/locations/{location}/units/{unit}"
*/
name?: pulumi.Input<string | undefined>;
/**
* List of concurrent UnitOperations that are operating on this Unit.
*/
ongoingOperations?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* 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<pulumi.Input<inputs.saasruntime.UnitOutputVariable>[] | undefined>;
/**
* List of pending (wait to be executed) UnitOperations for this unit.
*/
pendingOperations?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The combination of labels configured directly on the resource
* and default labels configured on the provider.
*/
pulumiLabels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
} | undefined>;
/**
* The current Release object for this Unit.
*/
release?: pulumi.Input<string | undefined>;
/**
* List of scheduled UnitOperations for this unit.
*/
scheduledOperations?: pulumi.Input<pulumi.Input<string>[] | undefined>;
/**
* 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<string | undefined>;
/**
* If set, indicates the time when the system will start removing the unit.
*/
systemCleanupAt?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* 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<string | undefined>;
/**
* 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<string | undefined>;
/**
* The ID value for the new unit.
*/
unitId?: pulumi.Input<string | undefined>;
/**
* Reference to the UnitKind this Unit belongs to. Immutable once set.
*/
unitKind?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
}
/**
* 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<string>;
} | undefined>;
/**
* Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
* When a 'terraform destroy' or 'pulumi up' would delete the resource,
* the command will fail if this field is set to "PREVENT" in Terraform state.
* When set to "ABANDON", the command will remove the resource from Terraform
* management without updating or deleting the resource in the API.
* When set to "DELETE", deleting the resource is allowed.
*/
deletionPolicy?: pulumi.Input<string | undefined>;
/**
* 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<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.
*/
location: pulumi.Input<string>;
/**
* 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<inputs.saasruntime.UnitMaintenance | undefined>;
/**
* 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<string | undefined>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* 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<string | undefined>;
/**
* The ID value for the new unit.
*/
unitId: pulumi.Input<string>;
/**
* Reference to the UnitKind this Unit belongs to. Immutable once set.
*/
unitKind?: pulumi.Input<string | undefined>;
}
//# sourceMappingURL=unit.d.ts.map