UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,318 lines 229 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeDisk = exports.ComputeDiskTimeoutsOutputReference = exports.ComputeDiskSourceSnapshotEncryptionKeyOutputReference = exports.ComputeDiskSourceImageEncryptionKeyOutputReference = exports.ComputeDiskParamsOutputReference = exports.ComputeDiskGuestOsFeaturesList = exports.ComputeDiskGuestOsFeaturesOutputReference = exports.ComputeDiskDiskEncryptionKeyOutputReference = exports.ComputeDiskAsyncPrimaryDiskOutputReference = void 0; exports.computeDiskAsyncPrimaryDiskToTerraform = computeDiskAsyncPrimaryDiskToTerraform; exports.computeDiskAsyncPrimaryDiskToHclTerraform = computeDiskAsyncPrimaryDiskToHclTerraform; exports.computeDiskDiskEncryptionKeyToTerraform = computeDiskDiskEncryptionKeyToTerraform; exports.computeDiskDiskEncryptionKeyToHclTerraform = computeDiskDiskEncryptionKeyToHclTerraform; exports.computeDiskGuestOsFeaturesToTerraform = computeDiskGuestOsFeaturesToTerraform; exports.computeDiskGuestOsFeaturesToHclTerraform = computeDiskGuestOsFeaturesToHclTerraform; exports.computeDiskParamsToTerraform = computeDiskParamsToTerraform; exports.computeDiskParamsToHclTerraform = computeDiskParamsToHclTerraform; exports.computeDiskSourceImageEncryptionKeyToTerraform = computeDiskSourceImageEncryptionKeyToTerraform; exports.computeDiskSourceImageEncryptionKeyToHclTerraform = computeDiskSourceImageEncryptionKeyToHclTerraform; exports.computeDiskSourceSnapshotEncryptionKeyToTerraform = computeDiskSourceSnapshotEncryptionKeyToTerraform; exports.computeDiskSourceSnapshotEncryptionKeyToHclTerraform = computeDiskSourceSnapshotEncryptionKeyToHclTerraform; exports.computeDiskTimeoutsToTerraform = computeDiskTimeoutsToTerraform; exports.computeDiskTimeoutsToHclTerraform = computeDiskTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeDiskAsyncPrimaryDiskToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { disk: cdktf.stringToTerraform(struct.disk), }; } function computeDiskAsyncPrimaryDiskToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { disk: { value: cdktf.stringToHclTerraform(struct.disk), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskAsyncPrimaryDiskOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._disk !== undefined) { hasAnyValues = true; internalValueResult.disk = this._disk; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._disk = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._disk = value.disk; } } get disk() { return this.getStringAttribute('disk'); } set disk(value) { this._disk = value; } // Temporarily expose input value. Use with caution. get diskInput() { return this._disk; } } exports.ComputeDiskAsyncPrimaryDiskOutputReference = ComputeDiskAsyncPrimaryDiskOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeDiskAsyncPrimaryDiskOutputReference[_a] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskAsyncPrimaryDiskOutputReference", version: "14.35.0" }; function computeDiskDiskEncryptionKeyToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { kms_key_self_link: cdktf.stringToTerraform(struct.kmsKeySelfLink), kms_key_service_account: cdktf.stringToTerraform(struct.kmsKeyServiceAccount), raw_key: cdktf.stringToTerraform(struct.rawKey), rsa_encrypted_key: cdktf.stringToTerraform(struct.rsaEncryptedKey), }; } function computeDiskDiskEncryptionKeyToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { kms_key_self_link: { value: cdktf.stringToHclTerraform(struct.kmsKeySelfLink), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_service_account: { value: cdktf.stringToHclTerraform(struct.kmsKeyServiceAccount), isBlock: false, type: "simple", storageClassType: "string", }, raw_key: { value: cdktf.stringToHclTerraform(struct.rawKey), isBlock: false, type: "simple", storageClassType: "string", }, rsa_encrypted_key: { value: cdktf.stringToHclTerraform(struct.rsaEncryptedKey), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskDiskEncryptionKeyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._kmsKeySelfLink !== undefined) { hasAnyValues = true; internalValueResult.kmsKeySelfLink = this._kmsKeySelfLink; } if (this._kmsKeyServiceAccount !== undefined) { hasAnyValues = true; internalValueResult.kmsKeyServiceAccount = this._kmsKeyServiceAccount; } if (this._rawKey !== undefined) { hasAnyValues = true; internalValueResult.rawKey = this._rawKey; } if (this._rsaEncryptedKey !== undefined) { hasAnyValues = true; internalValueResult.rsaEncryptedKey = this._rsaEncryptedKey; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._kmsKeySelfLink = undefined; this._kmsKeyServiceAccount = undefined; this._rawKey = undefined; this._rsaEncryptedKey = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsKeySelfLink = value.kmsKeySelfLink; this._kmsKeyServiceAccount = value.kmsKeyServiceAccount; this._rawKey = value.rawKey; this._rsaEncryptedKey = value.rsaEncryptedKey; } } get kmsKeySelfLink() { return this.getStringAttribute('kms_key_self_link'); } set kmsKeySelfLink(value) { this._kmsKeySelfLink = value; } resetKmsKeySelfLink() { this._kmsKeySelfLink = undefined; } // Temporarily expose input value. Use with caution. get kmsKeySelfLinkInput() { return this._kmsKeySelfLink; } get kmsKeyServiceAccount() { return this.getStringAttribute('kms_key_service_account'); } set kmsKeyServiceAccount(value) { this._kmsKeyServiceAccount = value; } resetKmsKeyServiceAccount() { this._kmsKeyServiceAccount = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyServiceAccountInput() { return this._kmsKeyServiceAccount; } get rawKey() { return this.getStringAttribute('raw_key'); } set rawKey(value) { this._rawKey = value; } resetRawKey() { this._rawKey = undefined; } // Temporarily expose input value. Use with caution. get rawKeyInput() { return this._rawKey; } get rsaEncryptedKey() { return this.getStringAttribute('rsa_encrypted_key'); } set rsaEncryptedKey(value) { this._rsaEncryptedKey = value; } resetRsaEncryptedKey() { this._rsaEncryptedKey = undefined; } // Temporarily expose input value. Use with caution. get rsaEncryptedKeyInput() { return this._rsaEncryptedKey; } // sha256 - computed: true, optional: false, required: false get sha256() { return this.getStringAttribute('sha256'); } } exports.ComputeDiskDiskEncryptionKeyOutputReference = ComputeDiskDiskEncryptionKeyOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeDiskDiskEncryptionKeyOutputReference[_b] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskDiskEncryptionKeyOutputReference", version: "14.35.0" }; function computeDiskGuestOsFeaturesToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { type: cdktf.stringToTerraform(struct.type), }; } function computeDiskGuestOsFeaturesToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskGuestOsFeaturesOutputReference extends cdktf.ComplexObject { /** * @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, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._type = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._type = value.type; } } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } } exports.ComputeDiskGuestOsFeaturesOutputReference = ComputeDiskGuestOsFeaturesOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeDiskGuestOsFeaturesOutputReference[_c] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskGuestOsFeaturesOutputReference", version: "14.35.0" }; class ComputeDiskGuestOsFeaturesList extends cdktf.ComplexList { /** * @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, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new ComputeDiskGuestOsFeaturesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeDiskGuestOsFeaturesList = ComputeDiskGuestOsFeaturesList; _d = JSII_RTTI_SYMBOL_1; ComputeDiskGuestOsFeaturesList[_d] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskGuestOsFeaturesList", version: "14.35.0" }; function computeDiskParamsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { resource_manager_tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.resourceManagerTags), }; } function computeDiskParamsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { resource_manager_tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.resourceManagerTags), isBlock: false, type: "map", storageClassType: "stringMap", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskParamsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._resourceManagerTags !== undefined) { hasAnyValues = true; internalValueResult.resourceManagerTags = this._resourceManagerTags; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._resourceManagerTags = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._resourceManagerTags = value.resourceManagerTags; } } get resourceManagerTags() { return this.getStringMapAttribute('resource_manager_tags'); } set resourceManagerTags(value) { this._resourceManagerTags = value; } resetResourceManagerTags() { this._resourceManagerTags = undefined; } // Temporarily expose input value. Use with caution. get resourceManagerTagsInput() { return this._resourceManagerTags; } } exports.ComputeDiskParamsOutputReference = ComputeDiskParamsOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeDiskParamsOutputReference[_e] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskParamsOutputReference", version: "14.35.0" }; function computeDiskSourceImageEncryptionKeyToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { kms_key_self_link: cdktf.stringToTerraform(struct.kmsKeySelfLink), kms_key_service_account: cdktf.stringToTerraform(struct.kmsKeyServiceAccount), raw_key: cdktf.stringToTerraform(struct.rawKey), }; } function computeDiskSourceImageEncryptionKeyToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { kms_key_self_link: { value: cdktf.stringToHclTerraform(struct.kmsKeySelfLink), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_service_account: { value: cdktf.stringToHclTerraform(struct.kmsKeyServiceAccount), isBlock: false, type: "simple", storageClassType: "string", }, raw_key: { value: cdktf.stringToHclTerraform(struct.rawKey), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskSourceImageEncryptionKeyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._kmsKeySelfLink !== undefined) { hasAnyValues = true; internalValueResult.kmsKeySelfLink = this._kmsKeySelfLink; } if (this._kmsKeyServiceAccount !== undefined) { hasAnyValues = true; internalValueResult.kmsKeyServiceAccount = this._kmsKeyServiceAccount; } if (this._rawKey !== undefined) { hasAnyValues = true; internalValueResult.rawKey = this._rawKey; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._kmsKeySelfLink = undefined; this._kmsKeyServiceAccount = undefined; this._rawKey = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsKeySelfLink = value.kmsKeySelfLink; this._kmsKeyServiceAccount = value.kmsKeyServiceAccount; this._rawKey = value.rawKey; } } get kmsKeySelfLink() { return this.getStringAttribute('kms_key_self_link'); } set kmsKeySelfLink(value) { this._kmsKeySelfLink = value; } resetKmsKeySelfLink() { this._kmsKeySelfLink = undefined; } // Temporarily expose input value. Use with caution. get kmsKeySelfLinkInput() { return this._kmsKeySelfLink; } get kmsKeyServiceAccount() { return this.getStringAttribute('kms_key_service_account'); } set kmsKeyServiceAccount(value) { this._kmsKeyServiceAccount = value; } resetKmsKeyServiceAccount() { this._kmsKeyServiceAccount = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyServiceAccountInput() { return this._kmsKeyServiceAccount; } get rawKey() { return this.getStringAttribute('raw_key'); } set rawKey(value) { this._rawKey = value; } resetRawKey() { this._rawKey = undefined; } // Temporarily expose input value. Use with caution. get rawKeyInput() { return this._rawKey; } // sha256 - computed: true, optional: false, required: false get sha256() { return this.getStringAttribute('sha256'); } } exports.ComputeDiskSourceImageEncryptionKeyOutputReference = ComputeDiskSourceImageEncryptionKeyOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeDiskSourceImageEncryptionKeyOutputReference[_f] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskSourceImageEncryptionKeyOutputReference", version: "14.35.0" }; function computeDiskSourceSnapshotEncryptionKeyToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { kms_key_self_link: cdktf.stringToTerraform(struct.kmsKeySelfLink), kms_key_service_account: cdktf.stringToTerraform(struct.kmsKeyServiceAccount), raw_key: cdktf.stringToTerraform(struct.rawKey), }; } function computeDiskSourceSnapshotEncryptionKeyToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { kms_key_self_link: { value: cdktf.stringToHclTerraform(struct.kmsKeySelfLink), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_service_account: { value: cdktf.stringToHclTerraform(struct.kmsKeyServiceAccount), isBlock: false, type: "simple", storageClassType: "string", }, raw_key: { value: cdktf.stringToHclTerraform(struct.rawKey), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskSourceSnapshotEncryptionKeyOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._kmsKeySelfLink !== undefined) { hasAnyValues = true; internalValueResult.kmsKeySelfLink = this._kmsKeySelfLink; } if (this._kmsKeyServiceAccount !== undefined) { hasAnyValues = true; internalValueResult.kmsKeyServiceAccount = this._kmsKeyServiceAccount; } if (this._rawKey !== undefined) { hasAnyValues = true; internalValueResult.rawKey = this._rawKey; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._kmsKeySelfLink = undefined; this._kmsKeyServiceAccount = undefined; this._rawKey = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsKeySelfLink = value.kmsKeySelfLink; this._kmsKeyServiceAccount = value.kmsKeyServiceAccount; this._rawKey = value.rawKey; } } get kmsKeySelfLink() { return this.getStringAttribute('kms_key_self_link'); } set kmsKeySelfLink(value) { this._kmsKeySelfLink = value; } resetKmsKeySelfLink() { this._kmsKeySelfLink = undefined; } // Temporarily expose input value. Use with caution. get kmsKeySelfLinkInput() { return this._kmsKeySelfLink; } get kmsKeyServiceAccount() { return this.getStringAttribute('kms_key_service_account'); } set kmsKeyServiceAccount(value) { this._kmsKeyServiceAccount = value; } resetKmsKeyServiceAccount() { this._kmsKeyServiceAccount = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyServiceAccountInput() { return this._kmsKeyServiceAccount; } get rawKey() { return this.getStringAttribute('raw_key'); } set rawKey(value) { this._rawKey = value; } resetRawKey() { this._rawKey = undefined; } // Temporarily expose input value. Use with caution. get rawKeyInput() { return this._rawKey; } // sha256 - computed: true, optional: false, required: false get sha256() { return this.getStringAttribute('sha256'); } } exports.ComputeDiskSourceSnapshotEncryptionKeyOutputReference = ComputeDiskSourceSnapshotEncryptionKeyOutputReference; _g = JSII_RTTI_SYMBOL_1; ComputeDiskSourceSnapshotEncryptionKeyOutputReference[_g] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskSourceSnapshotEncryptionKeyOutputReference", version: "14.35.0" }; function computeDiskTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } function computeDiskTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeDiskTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.ComputeDiskTimeoutsOutputReference = ComputeDiskTimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; ComputeDiskTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.computeDisk.ComputeDiskTimeoutsOutputReference", version: "14.35.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_disk google_compute_disk} */ class ComputeDisk extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ComputeDisk 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 ComputeDisk to import * @param importFromId The id of the existing ComputeDisk that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_disk#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ComputeDisk to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_compute_disk", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.36.0/docs/resources/compute_disk google_compute_disk} 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 ComputeDiskConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_compute_disk', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.36.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // effective_labels - computed: true, optional: false, required: false this._effectiveLabels = new cdktf.StringMap(this, "effective_labels"); // terraform_labels - computed: true, optional: false, required: false this._terraformLabels = new cdktf.StringMap(this, "terraform_labels"); // async_primary_disk - computed: false, optional: true, required: false this._asyncPrimaryDisk = new ComputeDiskAsyncPrimaryDiskOutputReference(this, "async_primary_disk"); // disk_encryption_key - computed: false, optional: true, required: false this._diskEncryptionKey = new ComputeDiskDiskEncryptionKeyOutputReference(this, "disk_encryption_key"); // guest_os_features - computed: false, optional: true, required: false this._guestOsFeatures = new ComputeDiskGuestOsFeaturesList(this, "guest_os_features", true); // params - computed: false, optional: true, required: false this._params = new ComputeDiskParamsOutputReference(this, "params"); // source_image_encryption_key - computed: false, optional: true, required: false this._sourceImageEncryptionKey = new ComputeDiskSourceImageEncryptionKeyOutputReference(this, "source_image_encryption_key"); // source_snapshot_encryption_key - computed: false, optional: true, required: false this._sourceSnapshotEncryptionKey = new ComputeDiskSourceSnapshotEncryptionKeyOutputReference(this, "source_snapshot_encryption_key"); // timeouts - computed: false, optional: true, required: false this._timeouts = new ComputeDiskTimeoutsOutputReference(this, "timeouts"); this._accessMode = config.accessMode; this._architecture = config.architecture; this._createSnapshotBeforeDestroy = config.createSnapshotBeforeDestroy; this._createSnapshotBeforeDestroyPrefix = config.createSnapshotBeforeDestroyPrefix; this._description = config.description; this._enableConfidentialCompute = config.enableConfidentialCompute; this._id = config.id; this._image = config.image; this._labels = config.labels; this._licenses = config.licenses; this._name = config.name; this._physicalBlockSizeBytes = config.physicalBlockSizeBytes; this._project = config.project; this._provisionedIops = config.provisionedIops; this._provisionedThroughput = config.provisionedThroughput; this._size = config.size; this._snapshot = config.snapshot; this._sourceDisk = config.sourceDisk; this._sourceInstantSnapshot = config.sourceInstantSnapshot; this._sourceStorageObject = config.sourceStorageObject; this._storagePool = config.storagePool; this._type = config.type; this._zone = config.zone; this._asyncPrimaryDisk.internalValue = config.asyncPrimaryDisk; this._diskEncryptionKey.internalValue = config.diskEncryptionKey; this._guestOsFeatures.internalValue = config.guestOsFeatures; this._params.internalValue = config.params; this._sourceImageEncryptionKey.internalValue = config.sourceImageEncryptionKey; this._sourceSnapshotEncryptionKey.internalValue = config.sourceSnapshotEncryptionKey; this._timeouts.internalValue = config.timeouts; } get accessMode() { return this.getStringAttribute('access_mode'); } set accessMode(value) { this._accessMode = value; } resetAccessMode() { this._accessMode = undefined; } // Temporarily expose input value. Use with caution. get accessModeInput() { return this._accessMode; } get architecture() { return this.getStringAttribute('architecture'); } set architecture(value) { this._architecture = value; } resetArchitecture() { this._architecture = undefined; } // Temporarily expose input value. Use with caution. get architectureInput() { return this._architecture; } get createSnapshotBeforeDestroy() { return this.getBooleanAttribute('create_snapshot_before_destroy'); } set createSnapshotBeforeDestroy(value) { this._createSnapshotBeforeDestroy = value; } resetCreateSnapshotBeforeDestroy() { this._createSnapshotBeforeDestroy = undefined; } // Temporarily expose input value. Use with caution. get createSnapshotBeforeDestroyInput() { return this._createSnapshotBeforeDestroy; } get createSnapshotBeforeDestroyPrefix() { return this.getStringAttribute('create_snapshot_before_destroy_prefix'); } set createSnapshotBeforeDestroyPrefix(value) { this._createSnapshotBeforeDestroyPrefix = value; } resetCreateSnapshotBeforeDestroyPrefix() { this._createSnapshotBeforeDestroyPrefix = undefined; } // Temporarily expose input value. Use with caution. get createSnapshotBeforeDestroyPrefixInput() { return this._createSnapshotBeforeDestroyPrefix; } // creation_timestamp - computed: true, optional: false, required: false get creationTimestamp() { return this.getStringAttribute('creation_timestamp'); } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } // disk_id - computed: true, optional: false, required: false get diskId() { return this.getStringAttribute('disk_id'); } get effectiveLabels() { return this._effectiveLabels; } get enableConfidentialCompute() { return this.getBooleanAttribute('enable_confidential_compute'); } set enableConfidentialCompute(value) { this._enableConfidentialCompute = value; } resetEnableConfidentialCompute() { this._enableConfidentialCompute = undefined; } // Temporarily expose input value. Use with caution. get enableConfidentialComputeInput() { return this._enableConfidentialCompute; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get image() { return this.getStringAttribute('image'); } set image(value) { this._image = value; } resetImage() { this._image = undefined; } // Temporarily expose input value. Use with caution. get imageInput() { return this._image; } // label_fingerprint - computed: true, optional: false, required: false get labelFingerprint() { return this.getStringAttribute('label_fingerprint'); } get labels() { return this.getStringMapAttribute('labels'); } set labels(value) { this._labels = value; } resetLabels() { this._labels = undefined; } // Temporarily expose input value. Use with caution. get labelsInput() { return this._labels; } // last_attach_timestamp - computed: true, optional: false, required: false get lastAttachTimestamp() { return this.getStringAttribute('last_attach_timestamp'); } // last_detach_timestamp - computed: true, optional: false, required: false get lastDetachTimestamp() { return this.getStringAttribute('last_detach_timestamp'); } get licenses() { return this.getListAttribute('licenses'); } set licenses(value) { this._licenses = value; } resetLicenses() { this._licenses = undefined; } // Temporarily expose input value. Use with caution. get licensesInput() { return this._licenses; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get physicalBlockSizeBytes() { return this.getNumberAttribute('physical_block_size_bytes'); } set physicalBlockSizeBytes(value) { this._physicalBlockSizeBytes = value; } resetPhysicalBlockSizeBytes() { this._physicalBlockSizeBytes = undefined; } // Temporarily expose input value. Use with caution. get physicalBlockSizeBytesInput() { return this._physicalBlockSizeBytes; } get project() { return this.getStringAttribute('project'); } set project(value) { this._project = value; } resetProject() { this._project = undefined; } // Temporarily expose input value. Use with caution. get projectInput() { return this._project; } get provisionedIops() { return this.getNumberAttribute('provisioned_iops'); } set provisionedIops(value) { this._provisionedIops = value; } resetProvisionedIops() { this._provisionedIops = undefined; } // Temporarily expose input value. Use with caution. get provisionedIopsInput() { return this._provisionedIops; } get provisionedThroughput() { return this.getNumberAttribute('provisioned_throughput'); } set provisionedThroughput(value) { this._provisionedThroughput = value; } resetProvisionedThroughput() { this._provisionedThroughput = undefined; } // Temporarily expose input value. Use with caution. get provisionedThroughputInput() { return this._provisionedThroughput; } // self_link - computed: true, optional: false, required: false get selfLink() { return this.getStringAttribute('self_link'); } get size() { return this.getNumberAttribute('size'); } set size(value) { this._size = value; } resetSize() { this._size = undefined; } // Temporarily expose input value. Use with caution. get sizeInput() { return this._size; } get snapshot() { return this.getStringAttribute('snapshot'); } set snapshot(value) { this._snapshot = value; } resetSnapshot() { this._snapshot = undefined; } // Temporarily expose input value. Use with caution. get snapshotInput() { return this._snapshot; } get sourceDisk() { return this.getStringAttribute('source_disk'); } set sourceDisk(value) { this._sourceDisk = value; } resetSourceDisk() { this._sourceDisk = undefined; } // Temporarily expose input value. Use with caution. get sourceDiskInput() { return this._sourceDisk; } // source_disk_id - computed: true, optional: false, required: false get sourceDiskId() { return this.getStringAttribute('source_disk_id'); } // source_image_id - computed: true, optional: false, required: false get sourceImageId() { return this.getStringAttribute('source_image_id'); } get sourceInstantSnapshot() { return this.getStringAttribute('source_instant_snapshot'); } set sourceInstantSnapshot(value) { this._sourceInstantSnapshot = value; } resetSourceInstantSnapshot() { this._sourceInstantSnapshot = undefined; } // Temporarily expose input value. Use with caution. get sourceInstantSnapshotInput() { return this._sourceInstantSnapshot; } // source_instant_snapshot_id - computed: true, optional: false, required: false get sourceInstantSnapshotId() { return this.getStringAttribute('source_instant_snapshot_id'); } // source_snapshot_id - computed: true, optional: false, required: false get sourceSnapshotId() { return this.getStringAttribute('source_snapshot_id'); } get sourceStorageObject() { return this.getStringAttribute('source_storage_object'); } set sourceStorageObject(value) { this._sourceStorageObject = value; } resetSourceStorageObject() { this._sourceStorageObject = undefined; } // Temporarily expose input value. Use with caution. get sourceStorageObjectInput() { return this._sourceStorageObject; } get storagePool() { return this.getStringAttribute('storage_pool'); } set storagePool(value) { this._storagePool = value; } resetStoragePool() { this._storagePool = undefined; } // Temporarily expose input value. Use with caution. get storagePoolInput() { return this._storagePool; } get terraformLabels() { return this._terraformLabels; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } resetType() { this._type = undefined; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } // users - computed: true, optional: false, required: false get users() { return this.getListAttribute('users'); } get zone() { return this.getStringAttribute('zone'); } set zone(value) { this._zone = value; } resetZone() { this._zone = undefined; } // Temporarily expose input value. Use with caution. get zoneInput() { return this._zone; } get asyncPrimaryDisk() { return this._asyncPrimaryDisk; } putAsyncPrimaryDisk(value) { this._asyncPrimaryDisk.internalValue = value; } resetAsyncPrimaryDisk() { this._asyncPrimaryDisk.internalValue = undefined; } // Temporarily expose input value. Use with caution. get asyncPrimaryDiskInput() { return this._asyncPrimaryDisk.internalValue; } get diskEncryptionKey() { return this._diskEncryptionKey; } putDiskEncryptionKey(value) { this._diskEncryptionKey.internalValue = value; } resetDiskEncryptionKey() { this._diskEncryptionKey.internalValue = undefined; } // Temporarily expose input value. Use with caution. get diskEncryptionKeyInput() { return this._diskEncryptionKey.internalValue; } get guestOsFeatures() { return this._guestOsFeatures; } putGuestOsFeatures(value) { this._guestOsFeatures.internalValue = value; } resetGuestOsFeatures() { this._guestOsFeatures.internalValue = undefined; } // Temporarily expose input value. Use with caution. get guestOsFeaturesInput() { return this._guestOsFeatures.internalValue; } get params() { return this._params; } putParams(value) { this._params.internalValue = value; } resetParams() { this._params.internalValue = undefined; } // Temporarily expose input value. Use with caution. get paramsInput() { return this._params.internalValue; } get sourceImageEncryptionKey() { return this._sourceImageEncryptionKey; } putSourceImageEncryptionKey(value) { this._sourceImageEncryptionKey.internalValue = value; } resetSourceImageEncryptionKey() { this._sourceImageEncrypti