UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,067 lines (1,066 loc) 660 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeInstanceTemplate = exports.ComputeInstanceTemplateTimeoutsOutputReference = exports.ComputeInstanceTemplateShieldedInstanceConfigOutputReference = exports.ComputeInstanceTemplateServiceAccountOutputReference = exports.ComputeInstanceTemplateSchedulingOutputReference = exports.ComputeInstanceTemplateSchedulingOnInstanceStopActionOutputReference = exports.ComputeInstanceTemplateSchedulingNodeAffinitiesList = exports.ComputeInstanceTemplateSchedulingNodeAffinitiesOutputReference = exports.ComputeInstanceTemplateSchedulingMaxRunDurationOutputReference = exports.ComputeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutList = exports.ComputeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutOutputReference = exports.ComputeInstanceTemplateReservationAffinityOutputReference = exports.ComputeInstanceTemplateReservationAffinitySpecificReservationOutputReference = exports.ComputeInstanceTemplateNetworkPerformanceConfigOutputReference = exports.ComputeInstanceTemplateNetworkInterfaceList = exports.ComputeInstanceTemplateNetworkInterfaceOutputReference = exports.ComputeInstanceTemplateNetworkInterfaceIpv6AccessConfigList = exports.ComputeInstanceTemplateNetworkInterfaceIpv6AccessConfigOutputReference = exports.ComputeInstanceTemplateNetworkInterfaceAliasIpRangeList = exports.ComputeInstanceTemplateNetworkInterfaceAliasIpRangeOutputReference = exports.ComputeInstanceTemplateNetworkInterfaceAccessConfigList = exports.ComputeInstanceTemplateNetworkInterfaceAccessConfigOutputReference = exports.ComputeInstanceTemplateGuestAcceleratorList = exports.ComputeInstanceTemplateGuestAcceleratorOutputReference = exports.ComputeInstanceTemplateDiskList = exports.ComputeInstanceTemplateDiskOutputReference = exports.ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference = exports.ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference = exports.ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference = exports.ComputeInstanceTemplateConfidentialInstanceConfigOutputReference = exports.ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference = void 0; exports.computeInstanceTemplateAdvancedMachineFeaturesToTerraform = computeInstanceTemplateAdvancedMachineFeaturesToTerraform; exports.computeInstanceTemplateAdvancedMachineFeaturesToHclTerraform = computeInstanceTemplateAdvancedMachineFeaturesToHclTerraform; exports.computeInstanceTemplateConfidentialInstanceConfigToTerraform = computeInstanceTemplateConfidentialInstanceConfigToTerraform; exports.computeInstanceTemplateConfidentialInstanceConfigToHclTerraform = computeInstanceTemplateConfidentialInstanceConfigToHclTerraform; exports.computeInstanceTemplateDiskDiskEncryptionKeyToTerraform = computeInstanceTemplateDiskDiskEncryptionKeyToTerraform; exports.computeInstanceTemplateDiskDiskEncryptionKeyToHclTerraform = computeInstanceTemplateDiskDiskEncryptionKeyToHclTerraform; exports.computeInstanceTemplateDiskSourceImageEncryptionKeyToTerraform = computeInstanceTemplateDiskSourceImageEncryptionKeyToTerraform; exports.computeInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform = computeInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform; exports.computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform = computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform; exports.computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform = computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform; exports.computeInstanceTemplateDiskToTerraform = computeInstanceTemplateDiskToTerraform; exports.computeInstanceTemplateDiskToHclTerraform = computeInstanceTemplateDiskToHclTerraform; exports.computeInstanceTemplateGuestAcceleratorToTerraform = computeInstanceTemplateGuestAcceleratorToTerraform; exports.computeInstanceTemplateGuestAcceleratorToHclTerraform = computeInstanceTemplateGuestAcceleratorToHclTerraform; exports.computeInstanceTemplateNetworkInterfaceAccessConfigToTerraform = computeInstanceTemplateNetworkInterfaceAccessConfigToTerraform; exports.computeInstanceTemplateNetworkInterfaceAccessConfigToHclTerraform = computeInstanceTemplateNetworkInterfaceAccessConfigToHclTerraform; exports.computeInstanceTemplateNetworkInterfaceAliasIpRangeToTerraform = computeInstanceTemplateNetworkInterfaceAliasIpRangeToTerraform; exports.computeInstanceTemplateNetworkInterfaceAliasIpRangeToHclTerraform = computeInstanceTemplateNetworkInterfaceAliasIpRangeToHclTerraform; exports.computeInstanceTemplateNetworkInterfaceIpv6AccessConfigToTerraform = computeInstanceTemplateNetworkInterfaceIpv6AccessConfigToTerraform; exports.computeInstanceTemplateNetworkInterfaceIpv6AccessConfigToHclTerraform = computeInstanceTemplateNetworkInterfaceIpv6AccessConfigToHclTerraform; exports.computeInstanceTemplateNetworkInterfaceToTerraform = computeInstanceTemplateNetworkInterfaceToTerraform; exports.computeInstanceTemplateNetworkInterfaceToHclTerraform = computeInstanceTemplateNetworkInterfaceToHclTerraform; exports.computeInstanceTemplateNetworkPerformanceConfigToTerraform = computeInstanceTemplateNetworkPerformanceConfigToTerraform; exports.computeInstanceTemplateNetworkPerformanceConfigToHclTerraform = computeInstanceTemplateNetworkPerformanceConfigToHclTerraform; exports.computeInstanceTemplateReservationAffinitySpecificReservationToTerraform = computeInstanceTemplateReservationAffinitySpecificReservationToTerraform; exports.computeInstanceTemplateReservationAffinitySpecificReservationToHclTerraform = computeInstanceTemplateReservationAffinitySpecificReservationToHclTerraform; exports.computeInstanceTemplateReservationAffinityToTerraform = computeInstanceTemplateReservationAffinityToTerraform; exports.computeInstanceTemplateReservationAffinityToHclTerraform = computeInstanceTemplateReservationAffinityToHclTerraform; exports.computeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToTerraform = computeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToTerraform; exports.computeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToHclTerraform = computeInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToHclTerraform; exports.computeInstanceTemplateSchedulingMaxRunDurationToTerraform = computeInstanceTemplateSchedulingMaxRunDurationToTerraform; exports.computeInstanceTemplateSchedulingMaxRunDurationToHclTerraform = computeInstanceTemplateSchedulingMaxRunDurationToHclTerraform; exports.computeInstanceTemplateSchedulingNodeAffinitiesToTerraform = computeInstanceTemplateSchedulingNodeAffinitiesToTerraform; exports.computeInstanceTemplateSchedulingNodeAffinitiesToHclTerraform = computeInstanceTemplateSchedulingNodeAffinitiesToHclTerraform; exports.computeInstanceTemplateSchedulingOnInstanceStopActionToTerraform = computeInstanceTemplateSchedulingOnInstanceStopActionToTerraform; exports.computeInstanceTemplateSchedulingOnInstanceStopActionToHclTerraform = computeInstanceTemplateSchedulingOnInstanceStopActionToHclTerraform; exports.computeInstanceTemplateSchedulingToTerraform = computeInstanceTemplateSchedulingToTerraform; exports.computeInstanceTemplateSchedulingToHclTerraform = computeInstanceTemplateSchedulingToHclTerraform; exports.computeInstanceTemplateServiceAccountToTerraform = computeInstanceTemplateServiceAccountToTerraform; exports.computeInstanceTemplateServiceAccountToHclTerraform = computeInstanceTemplateServiceAccountToHclTerraform; exports.computeInstanceTemplateShieldedInstanceConfigToTerraform = computeInstanceTemplateShieldedInstanceConfigToTerraform; exports.computeInstanceTemplateShieldedInstanceConfigToHclTerraform = computeInstanceTemplateShieldedInstanceConfigToHclTerraform; exports.computeInstanceTemplateTimeoutsToTerraform = computeInstanceTemplateTimeoutsToTerraform; exports.computeInstanceTemplateTimeoutsToHclTerraform = computeInstanceTemplateTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeInstanceTemplateAdvancedMachineFeaturesToTerraform(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 { enable_nested_virtualization: cdktf.booleanToTerraform(struct.enableNestedVirtualization), enable_uefi_networking: cdktf.booleanToTerraform(struct.enableUefiNetworking), performance_monitoring_unit: cdktf.stringToTerraform(struct.performanceMonitoringUnit), threads_per_core: cdktf.numberToTerraform(struct.threadsPerCore), turbo_mode: cdktf.stringToTerraform(struct.turboMode), visible_core_count: cdktf.numberToTerraform(struct.visibleCoreCount), }; } function computeInstanceTemplateAdvancedMachineFeaturesToHclTerraform(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 = { enable_nested_virtualization: { value: cdktf.booleanToHclTerraform(struct.enableNestedVirtualization), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_uefi_networking: { value: cdktf.booleanToHclTerraform(struct.enableUefiNetworking), isBlock: false, type: "simple", storageClassType: "boolean", }, performance_monitoring_unit: { value: cdktf.stringToHclTerraform(struct.performanceMonitoringUnit), isBlock: false, type: "simple", storageClassType: "string", }, threads_per_core: { value: cdktf.numberToHclTerraform(struct.threadsPerCore), isBlock: false, type: "simple", storageClassType: "number", }, turbo_mode: { value: cdktf.stringToHclTerraform(struct.turboMode), isBlock: false, type: "simple", storageClassType: "string", }, visible_core_count: { value: cdktf.numberToHclTerraform(struct.visibleCoreCount), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference 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._enableNestedVirtualization !== undefined) { hasAnyValues = true; internalValueResult.enableNestedVirtualization = this._enableNestedVirtualization; } if (this._enableUefiNetworking !== undefined) { hasAnyValues = true; internalValueResult.enableUefiNetworking = this._enableUefiNetworking; } if (this._performanceMonitoringUnit !== undefined) { hasAnyValues = true; internalValueResult.performanceMonitoringUnit = this._performanceMonitoringUnit; } if (this._threadsPerCore !== undefined) { hasAnyValues = true; internalValueResult.threadsPerCore = this._threadsPerCore; } if (this._turboMode !== undefined) { hasAnyValues = true; internalValueResult.turboMode = this._turboMode; } if (this._visibleCoreCount !== undefined) { hasAnyValues = true; internalValueResult.visibleCoreCount = this._visibleCoreCount; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enableNestedVirtualization = undefined; this._enableUefiNetworking = undefined; this._performanceMonitoringUnit = undefined; this._threadsPerCore = undefined; this._turboMode = undefined; this._visibleCoreCount = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enableNestedVirtualization = value.enableNestedVirtualization; this._enableUefiNetworking = value.enableUefiNetworking; this._performanceMonitoringUnit = value.performanceMonitoringUnit; this._threadsPerCore = value.threadsPerCore; this._turboMode = value.turboMode; this._visibleCoreCount = value.visibleCoreCount; } } get enableNestedVirtualization() { return this.getBooleanAttribute('enable_nested_virtualization'); } set enableNestedVirtualization(value) { this._enableNestedVirtualization = value; } resetEnableNestedVirtualization() { this._enableNestedVirtualization = undefined; } // Temporarily expose input value. Use with caution. get enableNestedVirtualizationInput() { return this._enableNestedVirtualization; } get enableUefiNetworking() { return this.getBooleanAttribute('enable_uefi_networking'); } set enableUefiNetworking(value) { this._enableUefiNetworking = value; } resetEnableUefiNetworking() { this._enableUefiNetworking = undefined; } // Temporarily expose input value. Use with caution. get enableUefiNetworkingInput() { return this._enableUefiNetworking; } get performanceMonitoringUnit() { return this.getStringAttribute('performance_monitoring_unit'); } set performanceMonitoringUnit(value) { this._performanceMonitoringUnit = value; } resetPerformanceMonitoringUnit() { this._performanceMonitoringUnit = undefined; } // Temporarily expose input value. Use with caution. get performanceMonitoringUnitInput() { return this._performanceMonitoringUnit; } get threadsPerCore() { return this.getNumberAttribute('threads_per_core'); } set threadsPerCore(value) { this._threadsPerCore = value; } resetThreadsPerCore() { this._threadsPerCore = undefined; } // Temporarily expose input value. Use with caution. get threadsPerCoreInput() { return this._threadsPerCore; } get turboMode() { return this.getStringAttribute('turbo_mode'); } set turboMode(value) { this._turboMode = value; } resetTurboMode() { this._turboMode = undefined; } // Temporarily expose input value. Use with caution. get turboModeInput() { return this._turboMode; } get visibleCoreCount() { return this.getNumberAttribute('visible_core_count'); } set visibleCoreCount(value) { this._visibleCoreCount = value; } resetVisibleCoreCount() { this._visibleCoreCount = undefined; } // Temporarily expose input value. Use with caution. get visibleCoreCountInput() { return this._visibleCoreCount; } } exports.ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference = ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference[_a] = { fqn: "@cdktf/provider-google.computeInstanceTemplate.ComputeInstanceTemplateAdvancedMachineFeaturesOutputReference", version: "14.35.0" }; function computeInstanceTemplateConfidentialInstanceConfigToTerraform(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 { confidential_instance_type: cdktf.stringToTerraform(struct.confidentialInstanceType), enable_confidential_compute: cdktf.booleanToTerraform(struct.enableConfidentialCompute), }; } function computeInstanceTemplateConfidentialInstanceConfigToHclTerraform(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 = { confidential_instance_type: { value: cdktf.stringToHclTerraform(struct.confidentialInstanceType), isBlock: false, type: "simple", storageClassType: "string", }, enable_confidential_compute: { value: cdktf.booleanToHclTerraform(struct.enableConfidentialCompute), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeInstanceTemplateConfidentialInstanceConfigOutputReference 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._confidentialInstanceType !== undefined) { hasAnyValues = true; internalValueResult.confidentialInstanceType = this._confidentialInstanceType; } if (this._enableConfidentialCompute !== undefined) { hasAnyValues = true; internalValueResult.enableConfidentialCompute = this._enableConfidentialCompute; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._confidentialInstanceType = undefined; this._enableConfidentialCompute = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._confidentialInstanceType = value.confidentialInstanceType; this._enableConfidentialCompute = value.enableConfidentialCompute; } } get confidentialInstanceType() { return this.getStringAttribute('confidential_instance_type'); } set confidentialInstanceType(value) { this._confidentialInstanceType = value; } resetConfidentialInstanceType() { this._confidentialInstanceType = undefined; } // Temporarily expose input value. Use with caution. get confidentialInstanceTypeInput() { return this._confidentialInstanceType; } 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; } } exports.ComputeInstanceTemplateConfidentialInstanceConfigOutputReference = ComputeInstanceTemplateConfidentialInstanceConfigOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeInstanceTemplateConfidentialInstanceConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.computeInstanceTemplate.ComputeInstanceTemplateConfidentialInstanceConfigOutputReference", version: "14.35.0" }; function computeInstanceTemplateDiskDiskEncryptionKeyToTerraform(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), }; } function computeInstanceTemplateDiskDiskEncryptionKeyToHclTerraform(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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference 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; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._kmsKeySelfLink = undefined; this._kmsKeyServiceAccount = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._kmsKeySelfLink = value.kmsKeySelfLink; this._kmsKeyServiceAccount = value.kmsKeyServiceAccount; } } 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; } } exports.ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference = ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference[_c] = { fqn: "@cdktf/provider-google.computeInstanceTemplate.ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference", version: "14.35.0" }; function computeInstanceTemplateDiskSourceImageEncryptionKeyToTerraform(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 computeInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform(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 ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference 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; } } exports.ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference = ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference[_d] = { fqn: "@cdktf/provider-google.computeInstanceTemplate.ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference", version: "14.35.0" }; function computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform(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 computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform(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 ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference 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; } } exports.ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference = ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference[_e] = { fqn: "@cdktf/provider-google.computeInstanceTemplate.ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference", version: "14.35.0" }; function computeInstanceTemplateDiskToTerraform(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 { architecture: cdktf.stringToTerraform(struct.architecture), auto_delete: cdktf.booleanToTerraform(struct.autoDelete), boot: cdktf.booleanToTerraform(struct.boot), device_name: cdktf.stringToTerraform(struct.deviceName), disk_name: cdktf.stringToTerraform(struct.diskName), disk_size_gb: cdktf.numberToTerraform(struct.diskSizeGb), disk_type: cdktf.stringToTerraform(struct.diskType), guest_os_features: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.guestOsFeatures), interface: cdktf.stringToTerraform(struct.interface), labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), mode: cdktf.stringToTerraform(struct.mode), provisioned_iops: cdktf.numberToTerraform(struct.provisionedIops), provisioned_throughput: cdktf.numberToTerraform(struct.provisionedThroughput), resource_manager_tags: cdktf.hashMapper(cdktf.stringToTerraform)(struct.resourceManagerTags), resource_policies: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourcePolicies), source: cdktf.stringToTerraform(struct.source), source_image: cdktf.stringToTerraform(struct.sourceImage), source_snapshot: cdktf.stringToTerraform(struct.sourceSnapshot), type: cdktf.stringToTerraform(struct.type), disk_encryption_key: computeInstanceTemplateDiskDiskEncryptionKeyToTerraform(struct.diskEncryptionKey), source_image_encryption_key: computeInstanceTemplateDiskSourceImageEncryptionKeyToTerraform(struct.sourceImageEncryptionKey), source_snapshot_encryption_key: computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform(struct.sourceSnapshotEncryptionKey), }; } function computeInstanceTemplateDiskToHclTerraform(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 = { architecture: { value: cdktf.stringToHclTerraform(struct.architecture), isBlock: false, type: "simple", storageClassType: "string", }, auto_delete: { value: cdktf.booleanToHclTerraform(struct.autoDelete), isBlock: false, type: "simple", storageClassType: "boolean", }, boot: { value: cdktf.booleanToHclTerraform(struct.boot), isBlock: false, type: "simple", storageClassType: "boolean", }, device_name: { value: cdktf.stringToHclTerraform(struct.deviceName), isBlock: false, type: "simple", storageClassType: "string", }, disk_name: { value: cdktf.stringToHclTerraform(struct.diskName), isBlock: false, type: "simple", storageClassType: "string", }, disk_size_gb: { value: cdktf.numberToHclTerraform(struct.diskSizeGb), isBlock: false, type: "simple", storageClassType: "number", }, disk_type: { value: cdktf.stringToHclTerraform(struct.diskType), isBlock: false, type: "simple", storageClassType: "string", }, guest_os_features: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.guestOsFeatures), isBlock: false, type: "list", storageClassType: "stringList", }, interface: { value: cdktf.stringToHclTerraform(struct.interface), isBlock: false, type: "simple", storageClassType: "string", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, provisioned_iops: { value: cdktf.numberToHclTerraform(struct.provisionedIops), isBlock: false, type: "simple", storageClassType: "number", }, provisioned_throughput: { value: cdktf.numberToHclTerraform(struct.provisionedThroughput), isBlock: false, type: "simple", storageClassType: "number", }, resource_manager_tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.resourceManagerTags), isBlock: false, type: "map", storageClassType: "stringMap", }, resource_policies: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourcePolicies), isBlock: false, type: "list", storageClassType: "stringList", }, source: { value: cdktf.stringToHclTerraform(struct.source), isBlock: false, type: "simple", storageClassType: "string", }, source_image: { value: cdktf.stringToHclTerraform(struct.sourceImage), isBlock: false, type: "simple", storageClassType: "string", }, source_snapshot: { value: cdktf.stringToHclTerraform(struct.sourceSnapshot), isBlock: false, type: "simple", storageClassType: "string", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, disk_encryption_key: { value: computeInstanceTemplateDiskDiskEncryptionKeyToHclTerraform(struct.diskEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeInstanceTemplateDiskDiskEncryptionKeyList", }, source_image_encryption_key: { value: computeInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform(struct.sourceImageEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeInstanceTemplateDiskSourceImageEncryptionKeyList", }, source_snapshot_encryption_key: { value: computeInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform(struct.sourceSnapshotEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeInstanceTemplateDiskOutputReference 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; // disk_encryption_key - computed: false, optional: true, required: false this._diskEncryptionKey = new ComputeInstanceTemplateDiskDiskEncryptionKeyOutputReference(this, "disk_encryption_key"); // source_image_encryption_key - computed: false, optional: true, required: false this._sourceImageEncryptionKey = new ComputeInstanceTemplateDiskSourceImageEncryptionKeyOutputReference(this, "source_image_encryption_key"); // source_snapshot_encryption_key - computed: false, optional: true, required: false this._sourceSnapshotEncryptionKey = new ComputeInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference(this, "source_snapshot_encryption_key"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._architecture !== undefined) { hasAnyValues = true; internalValueResult.architecture = this._architecture; } if (this._autoDelete !== undefined) { hasAnyValues = true; internalValueResult.autoDelete = this._autoDelete; } if (this._boot !== undefined) { hasAnyValues = true; internalValueResult.boot = this._boot; } if (this._deviceName !== undefined) { hasAnyValues = true; internalValueResult.deviceName = this._deviceName; } if (this._diskName !== undefined) { hasAnyValues = true; internalValueResult.diskName = this._diskName; } if (this._diskSizeGb !== undefined) { hasAnyValues = true; internalValueResult.diskSizeGb = this._diskSizeGb; } if (this._diskType !== undefined) { hasAnyValues = true; internalValueResult.diskType = this._diskType; } if (this._guestOsFeatures !== undefined) { hasAnyValues = true; internalValueResult.guestOsFeatures = this._guestOsFeatures; } if (this._interface !== undefined) { hasAnyValues = true; internalValueResult.interface = this._interface; } if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._provisionedIops !== undefined) { hasAnyValues = true; internalValueResult.provisionedIops = this._provisionedIops; } if (this._provisionedThroughput !== undefined) { hasAnyValues = true; internalValueResult.provisionedThroughput = this._provisionedThroughput; } if (this._resourceManagerTags !== undefined) { hasAnyValues = true; internalValueResult.resourceManagerTags = this._resourceManagerTags; } if (this._resourcePolicies !== undefined) { hasAnyValues = true; internalValueResult.resourcePolicies = this._resourcePolicies; } if (this._source !== undefined) { hasAnyValues = true; internalValueResult.source = this._source; } if (this._sourceImage !== undefined) { hasAnyValues = true; internalValueResult.sourceImage = this._sourceImage; } if (this._sourceSnapshot !== undefined) { hasAnyValues = true; internalValueResult.sourceSnapshot = this._sourceSnapshot; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._diskEncryptionKey?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.diskEncryptionKey = this._diskEncryptionKey?.internalValue; } if (this._sourceImageEncryptionKey?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.sourceImageEncryptionKey = this._sourceImageEncryptionKey?.internalValue; } if (this._sourceSnapshotEncryptionKey?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.sourceSnapshotEncryptionKey = this._sourceSnapshotEncryptionKey?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._architecture = undefined; this._autoDelete = undefined; this._boot = undefined; this._deviceName = undefined; this._diskName = undefined; this._diskSizeGb = undefined; this._diskType = undefined; this._guestOsFeatures = undefined; this._interface = undefined; this._labels = undefined; this._mode = undefined; this._provisionedIops = undefined; this._provisionedThroughput = undefined; this._resourceManagerTags = undefined; this._resourcePolicies = undefined;