@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
484 lines (483 loc) • 27.5 kB
TypeScript
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
export interface ComputeReservationConfig extends cdktf.TerraformMetaArguments {
/**
* An optional description of this resource.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#description ComputeReservation#description}
*/
readonly description?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#id ComputeReservation#id}
*
* Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2.
* If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
*/
readonly id?: string;
/**
* Name of the resource. Provided by the client when the resource is
* created. The name must be 1-63 characters long, and comply with
* RFC1035. Specifically, the name must be 1-63 characters long and match
* the regular expression '[a-z]([-a-z0-9]*[a-z0-9])?' which means the
* first character must be a lowercase letter, and all following
* characters must be a dash, lowercase letter, or digit, except the last
* character, which cannot be a dash.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#name ComputeReservation#name}
*/
readonly name: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#project ComputeReservation#project}
*/
readonly project?: string;
/**
* When set to true, only VMs that target this reservation by name can
* consume this reservation. Otherwise, it can be consumed by VMs with
* affinity for any reservation. Defaults to false.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#specific_reservation_required ComputeReservation#specific_reservation_required}
*/
readonly specificReservationRequired?: boolean | cdktf.IResolvable;
/**
* The zone where the reservation is made.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#zone ComputeReservation#zone}
*/
readonly zone: string;
/**
* share_settings block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#share_settings ComputeReservation#share_settings}
*/
readonly shareSettings?: ComputeReservationShareSettings;
/**
* specific_reservation block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#specific_reservation ComputeReservation#specific_reservation}
*/
readonly specificReservation: ComputeReservationSpecificReservation;
/**
* timeouts block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#timeouts ComputeReservation#timeouts}
*/
readonly timeouts?: ComputeReservationTimeouts;
}
export interface ComputeReservationShareSettingsProjectMap {
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#id ComputeReservation#id}
*
* Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2.
* If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
*/
readonly id: string;
/**
* The project id/number, should be same as the key of this project config in the project map.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#project_id ComputeReservation#project_id}
*/
readonly projectId?: string;
}
export declare function computeReservationShareSettingsProjectMapToTerraform(struct?: ComputeReservationShareSettingsProjectMap | cdktf.IResolvable): any;
export declare function computeReservationShareSettingsProjectMapToHclTerraform(struct?: ComputeReservationShareSettingsProjectMap | cdktf.IResolvable): any;
export declare class ComputeReservationShareSettingsProjectMapOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
private resolvableValue?;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean);
get internalValue(): ComputeReservationShareSettingsProjectMap | cdktf.IResolvable | undefined;
set internalValue(value: ComputeReservationShareSettingsProjectMap | cdktf.IResolvable | undefined);
private _id?;
get id(): string;
set id(value: string);
get idInput(): string | undefined;
private _projectId?;
get projectId(): string;
set projectId(value: string);
resetProjectId(): void;
get projectIdInput(): string | undefined;
}
export declare class ComputeReservationShareSettingsProjectMapList extends cdktf.ComplexList {
protected terraformResource: cdktf.IInterpolatingParent;
protected terraformAttribute: string;
protected wrapsSet: boolean;
internalValue?: ComputeReservationShareSettingsProjectMap[] | cdktf.IResolvable;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean);
/**
* @param index the index of the item to return
*/
get(index: number): ComputeReservationShareSettingsProjectMapOutputReference;
}
export interface ComputeReservationShareSettings {
/**
* Type of sharing for this shared-reservation Possible values: ["LOCAL", "SPECIFIC_PROJECTS"]
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#share_type ComputeReservation#share_type}
*/
readonly shareType?: string;
/**
* project_map block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#project_map ComputeReservation#project_map}
*/
readonly projectMap?: ComputeReservationShareSettingsProjectMap[] | cdktf.IResolvable;
}
export declare function computeReservationShareSettingsToTerraform(struct?: ComputeReservationShareSettingsOutputReference | ComputeReservationShareSettings): any;
export declare function computeReservationShareSettingsToHclTerraform(struct?: ComputeReservationShareSettingsOutputReference | ComputeReservationShareSettings): any;
export declare class ComputeReservationShareSettingsOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
get internalValue(): ComputeReservationShareSettings | undefined;
set internalValue(value: ComputeReservationShareSettings | undefined);
private _shareType?;
get shareType(): string;
set shareType(value: string);
resetShareType(): void;
get shareTypeInput(): string | undefined;
private _projectMap;
get projectMap(): ComputeReservationShareSettingsProjectMapList;
putProjectMap(value: ComputeReservationShareSettingsProjectMap[] | cdktf.IResolvable): void;
resetProjectMap(): void;
get projectMapInput(): cdktf.IResolvable | ComputeReservationShareSettingsProjectMap[] | undefined;
}
export interface ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators {
/**
* The number of the guest accelerator cards exposed to
* this instance.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#accelerator_count ComputeReservation#accelerator_count}
*/
readonly acceleratorCount: number;
/**
* The full or partial URL of the accelerator type to
* attach to this instance. For example:
* 'projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100'
*
* If you are creating an instance template, specify only the accelerator name.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#accelerator_type ComputeReservation#accelerator_type}
*/
readonly acceleratorType: string;
}
export declare function computeReservationSpecificReservationInstancePropertiesGuestAcceleratorsToTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators | cdktf.IResolvable): any;
export declare function computeReservationSpecificReservationInstancePropertiesGuestAcceleratorsToHclTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators | cdktf.IResolvable): any;
export declare class ComputeReservationSpecificReservationInstancePropertiesGuestAcceleratorsOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
private resolvableValue?;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean);
get internalValue(): ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators | cdktf.IResolvable | undefined;
set internalValue(value: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators | cdktf.IResolvable | undefined);
private _acceleratorCount?;
get acceleratorCount(): number;
set acceleratorCount(value: number);
get acceleratorCountInput(): number | undefined;
private _acceleratorType?;
get acceleratorType(): string;
set acceleratorType(value: string);
get acceleratorTypeInput(): string | undefined;
}
export declare class ComputeReservationSpecificReservationInstancePropertiesGuestAcceleratorsList extends cdktf.ComplexList {
protected terraformResource: cdktf.IInterpolatingParent;
protected terraformAttribute: string;
protected wrapsSet: boolean;
internalValue?: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators[] | cdktf.IResolvable;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean);
/**
* @param index the index of the item to return
*/
get(index: number): ComputeReservationSpecificReservationInstancePropertiesGuestAcceleratorsOutputReference;
}
export interface ComputeReservationSpecificReservationInstancePropertiesLocalSsds {
/**
* The size of the disk in base-2 GB.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#disk_size_gb ComputeReservation#disk_size_gb}
*/
readonly diskSizeGb: number;
/**
* The disk interface to use for attaching this disk. Default value: "SCSI" Possible values: ["SCSI", "NVME"]
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#interface ComputeReservation#interface}
*/
readonly interface?: string;
}
export declare function computeReservationSpecificReservationInstancePropertiesLocalSsdsToTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesLocalSsds | cdktf.IResolvable): any;
export declare function computeReservationSpecificReservationInstancePropertiesLocalSsdsToHclTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesLocalSsds | cdktf.IResolvable): any;
export declare class ComputeReservationSpecificReservationInstancePropertiesLocalSsdsOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
private resolvableValue?;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param complexObjectIndex the index of this item in the list
* @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean);
get internalValue(): ComputeReservationSpecificReservationInstancePropertiesLocalSsds | cdktf.IResolvable | undefined;
set internalValue(value: ComputeReservationSpecificReservationInstancePropertiesLocalSsds | cdktf.IResolvable | undefined);
private _diskSizeGb?;
get diskSizeGb(): number;
set diskSizeGb(value: number);
get diskSizeGbInput(): number | undefined;
private _interface?;
get interface(): string;
set interface(value: string);
resetInterface(): void;
get interfaceInput(): string | undefined;
}
export declare class ComputeReservationSpecificReservationInstancePropertiesLocalSsdsList extends cdktf.ComplexList {
protected terraformResource: cdktf.IInterpolatingParent;
protected terraformAttribute: string;
protected wrapsSet: boolean;
internalValue?: ComputeReservationSpecificReservationInstancePropertiesLocalSsds[] | cdktf.IResolvable;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
* @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index)
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean);
/**
* @param index the index of the item to return
*/
get(index: number): ComputeReservationSpecificReservationInstancePropertiesLocalSsdsOutputReference;
}
export interface ComputeReservationSpecificReservationInstanceProperties {
/**
* The name of the machine type to reserve.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#machine_type ComputeReservation#machine_type}
*/
readonly machineType: string;
/**
* The minimum CPU platform for the reservation. For example,
* '"Intel Skylake"'. See
* the CPU platform availability reference](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones)
* for information on available CPU platforms.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#min_cpu_platform ComputeReservation#min_cpu_platform}
*/
readonly minCpuPlatform?: string;
/**
* guest_accelerators block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#guest_accelerators ComputeReservation#guest_accelerators}
*/
readonly guestAccelerators?: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators[] | cdktf.IResolvable;
/**
* local_ssds block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#local_ssds ComputeReservation#local_ssds}
*/
readonly localSsds?: ComputeReservationSpecificReservationInstancePropertiesLocalSsds[] | cdktf.IResolvable;
}
export declare function computeReservationSpecificReservationInstancePropertiesToTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesOutputReference | ComputeReservationSpecificReservationInstanceProperties): any;
export declare function computeReservationSpecificReservationInstancePropertiesToHclTerraform(struct?: ComputeReservationSpecificReservationInstancePropertiesOutputReference | ComputeReservationSpecificReservationInstanceProperties): any;
export declare class ComputeReservationSpecificReservationInstancePropertiesOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
get internalValue(): ComputeReservationSpecificReservationInstanceProperties | undefined;
set internalValue(value: ComputeReservationSpecificReservationInstanceProperties | undefined);
private _machineType?;
get machineType(): string;
set machineType(value: string);
get machineTypeInput(): string | undefined;
private _minCpuPlatform?;
get minCpuPlatform(): string;
set minCpuPlatform(value: string);
resetMinCpuPlatform(): void;
get minCpuPlatformInput(): string | undefined;
private _guestAccelerators;
get guestAccelerators(): ComputeReservationSpecificReservationInstancePropertiesGuestAcceleratorsList;
putGuestAccelerators(value: ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators[] | cdktf.IResolvable): void;
resetGuestAccelerators(): void;
get guestAcceleratorsInput(): cdktf.IResolvable | ComputeReservationSpecificReservationInstancePropertiesGuestAccelerators[] | undefined;
private _localSsds;
get localSsds(): ComputeReservationSpecificReservationInstancePropertiesLocalSsdsList;
putLocalSsds(value: ComputeReservationSpecificReservationInstancePropertiesLocalSsds[] | cdktf.IResolvable): void;
resetLocalSsds(): void;
get localSsdsInput(): cdktf.IResolvable | ComputeReservationSpecificReservationInstancePropertiesLocalSsds[] | undefined;
}
export interface ComputeReservationSpecificReservation {
/**
* The number of resources that are allocated.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#count ComputeReservation#count}
*/
readonly count: number;
/**
* instance_properties block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#instance_properties ComputeReservation#instance_properties}
*/
readonly instanceProperties: ComputeReservationSpecificReservationInstanceProperties;
}
export declare function computeReservationSpecificReservationToTerraform(struct?: ComputeReservationSpecificReservationOutputReference | ComputeReservationSpecificReservation): any;
export declare function computeReservationSpecificReservationToHclTerraform(struct?: ComputeReservationSpecificReservationOutputReference | ComputeReservationSpecificReservation): any;
export declare class ComputeReservationSpecificReservationOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
get internalValue(): ComputeReservationSpecificReservation | undefined;
set internalValue(value: ComputeReservationSpecificReservation | undefined);
private _count?;
get count(): number;
set count(value: number);
get countInput(): number | undefined;
get inUseCount(): number;
private _instanceProperties;
get instanceProperties(): ComputeReservationSpecificReservationInstancePropertiesOutputReference;
putInstanceProperties(value: ComputeReservationSpecificReservationInstanceProperties): void;
get instancePropertiesInput(): ComputeReservationSpecificReservationInstanceProperties | undefined;
}
export interface ComputeReservationTimeouts {
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#create ComputeReservation#create}
*/
readonly create?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#delete ComputeReservation#delete}
*/
readonly delete?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#update ComputeReservation#update}
*/
readonly update?: string;
}
export declare function computeReservationTimeoutsToTerraform(struct?: ComputeReservationTimeouts | cdktf.IResolvable): any;
export declare function computeReservationTimeoutsToHclTerraform(struct?: ComputeReservationTimeouts | cdktf.IResolvable): any;
export declare class ComputeReservationTimeoutsOutputReference extends cdktf.ComplexObject {
private isEmptyObject;
private resolvableValue?;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string);
get internalValue(): ComputeReservationTimeouts | cdktf.IResolvable | undefined;
set internalValue(value: ComputeReservationTimeouts | cdktf.IResolvable | undefined);
private _create?;
get create(): string;
set create(value: string);
resetCreate(): void;
get createInput(): string | undefined;
private _delete?;
get delete(): string;
set delete(value: string);
resetDelete(): void;
get deleteInput(): string | undefined;
private _update?;
get update(): string;
set update(value: string);
resetUpdate(): void;
get updateInput(): string | undefined;
}
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation google_compute_reservation}
*/
export declare class ComputeReservation extends cdktf.TerraformResource {
static readonly tfResourceType = "google_compute_reservation";
/**
* Generates CDKTF code for importing a ComputeReservation resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the ComputeReservation to import
* @param importFromId The id of the existing ComputeReservation that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ComputeReservation to import is found
*/
static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): cdktf.ImportableResource;
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/compute_reservation google_compute_reservation} Resource
*
* @param scope The scope in which to define this construct
* @param id The scoped construct ID. Must be unique amongst siblings in the same scope
* @param options ComputeReservationConfig
*/
constructor(scope: Construct, id: string, config: ComputeReservationConfig);
get commitment(): string;
get creationTimestamp(): string;
private _description?;
get description(): string;
set description(value: string);
resetDescription(): void;
get descriptionInput(): string | undefined;
private _id?;
get id(): string;
set id(value: string);
resetId(): void;
get idInput(): string | undefined;
private _name?;
get name(): string;
set name(value: string);
get nameInput(): string | undefined;
private _project?;
get project(): string;
set project(value: string);
resetProject(): void;
get projectInput(): string | undefined;
get selfLink(): string;
private _specificReservationRequired?;
get specificReservationRequired(): boolean | cdktf.IResolvable;
set specificReservationRequired(value: boolean | cdktf.IResolvable);
resetSpecificReservationRequired(): void;
get specificReservationRequiredInput(): boolean | cdktf.IResolvable | undefined;
get status(): string;
private _zone?;
get zone(): string;
set zone(value: string);
get zoneInput(): string | undefined;
private _shareSettings;
get shareSettings(): ComputeReservationShareSettingsOutputReference;
putShareSettings(value: ComputeReservationShareSettings): void;
resetShareSettings(): void;
get shareSettingsInput(): ComputeReservationShareSettings | undefined;
private _specificReservation;
get specificReservation(): ComputeReservationSpecificReservationOutputReference;
putSpecificReservation(value: ComputeReservationSpecificReservation): void;
get specificReservationInput(): ComputeReservationSpecificReservation | undefined;
private _timeouts;
get timeouts(): ComputeReservationTimeoutsOutputReference;
putTimeouts(value: ComputeReservationTimeouts): void;
resetTimeouts(): void;
get timeoutsInput(): cdktf.IResolvable | ComputeReservationTimeouts | undefined;
protected synthesizeAttributes(): {
[name: string]: any;
};
protected synthesizeHclAttributes(): {
[name: string]: any;
};
}