@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
435 lines (434 loc) • 20.7 kB
TypeScript
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
export interface ComputeImageConfig extends cdktf.TerraformMetaArguments {
/**
* An optional description of this resource. Provide this property when
* you create the resource.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#description ComputeImage#description}
*/
readonly description?: string;
/**
* Size of the image when restored onto a persistent disk (in GB).
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#disk_size_gb ComputeImage#disk_size_gb}
*/
readonly diskSizeGb?: number;
/**
* The name of the image family to which this image belongs. You can
* create disks by specifying an image family instead of a specific
* image name. The image family always returns its latest image that is
* not deprecated. The name of the image family must comply with
* RFC1035.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#family ComputeImage#family}
*/
readonly family?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#id ComputeImage#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;
/**
* Labels to apply to this Image.
*
* **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
* Please refer to the field 'effective_labels' for all of the labels present on the resource.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#labels ComputeImage#labels}
*/
readonly labels?: {
[key: string]: string;
};
/**
* Any applicable license URI.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#licenses ComputeImage#licenses}
*/
readonly licenses?: 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.4.0/docs/resources/compute_image#name ComputeImage#name}
*/
readonly name: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#project ComputeImage#project}
*/
readonly project?: string;
/**
* The source disk to create this image based on.
* You must provide either this property or the
* rawDisk.source property but not both to create an image.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#source_disk ComputeImage#source_disk}
*/
readonly sourceDisk?: string;
/**
* URL of the source image used to create this image. In order to create an image, you must provide the full or partial
* URL of one of the following:
*
* * The selfLink URL
* * This property
* * The rawDisk.source URL
* * The sourceDisk URL
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#source_image ComputeImage#source_image}
*/
readonly sourceImage?: string;
/**
* URL of the source snapshot used to create this image.
*
* In order to create an image, you must provide the full or partial URL of one of the following:
*
* * The selfLink URL
* * This property
* * The sourceImage URL
* * The rawDisk.source URL
* * The sourceDisk URL
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#source_snapshot ComputeImage#source_snapshot}
*/
readonly sourceSnapshot?: string;
/**
* Cloud Storage bucket storage location of the image
* (regional or multi-regional).
* Reference link: https://cloud.google.com/compute/docs/reference/rest/v1/images
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#storage_locations ComputeImage#storage_locations}
*/
readonly storageLocations?: string[];
/**
* guest_os_features block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#guest_os_features ComputeImage#guest_os_features}
*/
readonly guestOsFeatures?: ComputeImageGuestOsFeatures[] | cdktf.IResolvable;
/**
* image_encryption_key block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#image_encryption_key ComputeImage#image_encryption_key}
*/
readonly imageEncryptionKey?: ComputeImageImageEncryptionKey;
/**
* raw_disk block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#raw_disk ComputeImage#raw_disk}
*/
readonly rawDisk?: ComputeImageRawDisk;
/**
* timeouts block
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#timeouts ComputeImage#timeouts}
*/
readonly timeouts?: ComputeImageTimeouts;
}
export interface ComputeImageGuestOsFeatures {
/**
* The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE", "SEV_LIVE_MIGRATABLE_V2"]
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#type ComputeImage#type}
*/
readonly type: string;
}
export declare function computeImageGuestOsFeaturesToTerraform(struct?: ComputeImageGuestOsFeatures | cdktf.IResolvable): any;
export declare function computeImageGuestOsFeaturesToHclTerraform(struct?: ComputeImageGuestOsFeatures | cdktf.IResolvable): any;
export declare class ComputeImageGuestOsFeaturesOutputReference 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(): ComputeImageGuestOsFeatures | cdktf.IResolvable | undefined;
set internalValue(value: ComputeImageGuestOsFeatures | cdktf.IResolvable | undefined);
private _type?;
get type(): string;
set type(value: string);
get typeInput(): string | undefined;
}
export declare class ComputeImageGuestOsFeaturesList extends cdktf.ComplexList {
protected terraformResource: cdktf.IInterpolatingParent;
protected terraformAttribute: string;
protected wrapsSet: boolean;
internalValue?: ComputeImageGuestOsFeatures[] | 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): ComputeImageGuestOsFeaturesOutputReference;
}
export interface ComputeImageImageEncryptionKey {
/**
* The self link of the encryption key that is stored in Google Cloud
* KMS.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#kms_key_self_link ComputeImage#kms_key_self_link}
*/
readonly kmsKeySelfLink?: string;
/**
* The service account being used for the encryption request for the
* given KMS key. If absent, the Compute Engine default service
* account is used.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#kms_key_service_account ComputeImage#kms_key_service_account}
*/
readonly kmsKeyServiceAccount?: string;
}
export declare function computeImageImageEncryptionKeyToTerraform(struct?: ComputeImageImageEncryptionKeyOutputReference | ComputeImageImageEncryptionKey): any;
export declare function computeImageImageEncryptionKeyToHclTerraform(struct?: ComputeImageImageEncryptionKeyOutputReference | ComputeImageImageEncryptionKey): any;
export declare class ComputeImageImageEncryptionKeyOutputReference 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(): ComputeImageImageEncryptionKey | undefined;
set internalValue(value: ComputeImageImageEncryptionKey | undefined);
private _kmsKeySelfLink?;
get kmsKeySelfLink(): string;
set kmsKeySelfLink(value: string);
resetKmsKeySelfLink(): void;
get kmsKeySelfLinkInput(): string | undefined;
private _kmsKeyServiceAccount?;
get kmsKeyServiceAccount(): string;
set kmsKeyServiceAccount(value: string);
resetKmsKeyServiceAccount(): void;
get kmsKeyServiceAccountInput(): string | undefined;
}
export interface ComputeImageRawDisk {
/**
* The format used to encode and transmit the block device, which
* should be TAR. This is just a container and transmission format
* and not a runtime format. Provided by the client when the disk
* image is created. Default value: "TAR" Possible values: ["TAR"]
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#container_type ComputeImage#container_type}
*/
readonly containerType?: string;
/**
* An optional SHA1 checksum of the disk image before unpackaging.
* This is provided by the client when the disk image is created.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#sha1 ComputeImage#sha1}
*/
readonly sha1?: string;
/**
* The full Google Cloud Storage URL where disk storage is stored
* You must provide either this property or the sourceDisk property
* but not both.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#source ComputeImage#source}
*/
readonly source: string;
}
export declare function computeImageRawDiskToTerraform(struct?: ComputeImageRawDiskOutputReference | ComputeImageRawDisk): any;
export declare function computeImageRawDiskToHclTerraform(struct?: ComputeImageRawDiskOutputReference | ComputeImageRawDisk): any;
export declare class ComputeImageRawDiskOutputReference 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(): ComputeImageRawDisk | undefined;
set internalValue(value: ComputeImageRawDisk | undefined);
private _containerType?;
get containerType(): string;
set containerType(value: string);
resetContainerType(): void;
get containerTypeInput(): string | undefined;
private _sha1?;
get sha1(): string;
set sha1(value: string);
resetSha1(): void;
get sha1Input(): string | undefined;
private _source?;
get source(): string;
set source(value: string);
get sourceInput(): string | undefined;
}
export interface ComputeImageTimeouts {
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#create ComputeImage#create}
*/
readonly create?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#delete ComputeImage#delete}
*/
readonly delete?: string;
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#update ComputeImage#update}
*/
readonly update?: string;
}
export declare function computeImageTimeoutsToTerraform(struct?: ComputeImageTimeouts | cdktf.IResolvable): any;
export declare function computeImageTimeoutsToHclTerraform(struct?: ComputeImageTimeouts | cdktf.IResolvable): any;
export declare class ComputeImageTimeoutsOutputReference 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(): ComputeImageTimeouts | cdktf.IResolvable | undefined;
set internalValue(value: ComputeImageTimeouts | 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.4.0/docs/resources/compute_image google_compute_image}
*/
export declare class ComputeImage extends cdktf.TerraformResource {
static readonly tfResourceType = "google_compute_image";
/**
* Generates CDKTF code for importing a ComputeImage 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 ComputeImage to import
* @param importFromId The id of the existing ComputeImage that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/compute_image#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ComputeImage 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.4.0/docs/resources/compute_image google_compute_image} 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 ComputeImageConfig
*/
constructor(scope: Construct, id: string, config: ComputeImageConfig);
get archiveSizeBytes(): number;
get creationTimestamp(): string;
private _description?;
get description(): string;
set description(value: string);
resetDescription(): void;
get descriptionInput(): string | undefined;
private _diskSizeGb?;
get diskSizeGb(): number;
set diskSizeGb(value: number);
resetDiskSizeGb(): void;
get diskSizeGbInput(): number | undefined;
private _effectiveLabels;
get effectiveLabels(): cdktf.StringMap;
private _family?;
get family(): string;
set family(value: string);
resetFamily(): void;
get familyInput(): string | undefined;
private _id?;
get id(): string;
set id(value: string);
resetId(): void;
get idInput(): string | undefined;
get labelFingerprint(): string;
private _labels?;
get labels(): {
[key: string]: string;
};
set labels(value: {
[key: string]: string;
});
resetLabels(): void;
get labelsInput(): {
[key: string]: string;
} | undefined;
private _licenses?;
get licenses(): string[];
set licenses(value: string[]);
resetLicenses(): void;
get licensesInput(): 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 _sourceDisk?;
get sourceDisk(): string;
set sourceDisk(value: string);
resetSourceDisk(): void;
get sourceDiskInput(): string | undefined;
private _sourceImage?;
get sourceImage(): string;
set sourceImage(value: string);
resetSourceImage(): void;
get sourceImageInput(): string | undefined;
private _sourceSnapshot?;
get sourceSnapshot(): string;
set sourceSnapshot(value: string);
resetSourceSnapshot(): void;
get sourceSnapshotInput(): string | undefined;
private _storageLocations?;
get storageLocations(): string[];
set storageLocations(value: string[]);
resetStorageLocations(): void;
get storageLocationsInput(): string[] | undefined;
private _terraformLabels;
get terraformLabels(): cdktf.StringMap;
private _guestOsFeatures;
get guestOsFeatures(): ComputeImageGuestOsFeaturesList;
putGuestOsFeatures(value: ComputeImageGuestOsFeatures[] | cdktf.IResolvable): void;
resetGuestOsFeatures(): void;
get guestOsFeaturesInput(): cdktf.IResolvable | ComputeImageGuestOsFeatures[] | undefined;
private _imageEncryptionKey;
get imageEncryptionKey(): ComputeImageImageEncryptionKeyOutputReference;
putImageEncryptionKey(value: ComputeImageImageEncryptionKey): void;
resetImageEncryptionKey(): void;
get imageEncryptionKeyInput(): ComputeImageImageEncryptionKey | undefined;
private _rawDisk;
get rawDisk(): ComputeImageRawDiskOutputReference;
putRawDisk(value: ComputeImageRawDisk): void;
resetRawDisk(): void;
get rawDiskInput(): ComputeImageRawDisk | undefined;
private _timeouts;
get timeouts(): ComputeImageTimeoutsOutputReference;
putTimeouts(value: ComputeImageTimeouts): void;
resetTimeouts(): void;
get timeoutsInput(): cdktf.IResolvable | ComputeImageTimeouts | undefined;
protected synthesizeAttributes(): {
[name: string]: any;
};
protected synthesizeHclAttributes(): {
[name: string]: any;
};
}