UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,042 lines 666 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.ComputeRegionInstanceTemplate = exports.ComputeRegionInstanceTemplateTimeoutsOutputReference = exports.ComputeRegionInstanceTemplateShieldedInstanceConfigOutputReference = exports.ComputeRegionInstanceTemplateServiceAccountOutputReference = exports.ComputeRegionInstanceTemplateSchedulingOutputReference = exports.ComputeRegionInstanceTemplateSchedulingOnInstanceStopActionOutputReference = exports.ComputeRegionInstanceTemplateSchedulingNodeAffinitiesList = exports.ComputeRegionInstanceTemplateSchedulingNodeAffinitiesOutputReference = exports.ComputeRegionInstanceTemplateSchedulingMaxRunDurationOutputReference = exports.ComputeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutList = exports.ComputeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutOutputReference = exports.ComputeRegionInstanceTemplateReservationAffinityOutputReference = exports.ComputeRegionInstanceTemplateReservationAffinitySpecificReservationOutputReference = exports.ComputeRegionInstanceTemplateNetworkPerformanceConfigOutputReference = exports.ComputeRegionInstanceTemplateNetworkInterfaceList = exports.ComputeRegionInstanceTemplateNetworkInterfaceOutputReference = exports.ComputeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigList = exports.ComputeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigOutputReference = exports.ComputeRegionInstanceTemplateNetworkInterfaceAliasIpRangeList = exports.ComputeRegionInstanceTemplateNetworkInterfaceAliasIpRangeOutputReference = exports.ComputeRegionInstanceTemplateNetworkInterfaceAccessConfigList = exports.ComputeRegionInstanceTemplateNetworkInterfaceAccessConfigOutputReference = exports.ComputeRegionInstanceTemplateGuestAcceleratorList = exports.ComputeRegionInstanceTemplateGuestAcceleratorOutputReference = exports.ComputeRegionInstanceTemplateDiskList = exports.ComputeRegionInstanceTemplateDiskOutputReference = exports.ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference = exports.ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference = exports.ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference = exports.ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference = exports.ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference = void 0; exports.computeRegionInstanceTemplateAdvancedMachineFeaturesToTerraform = computeRegionInstanceTemplateAdvancedMachineFeaturesToTerraform; exports.computeRegionInstanceTemplateAdvancedMachineFeaturesToHclTerraform = computeRegionInstanceTemplateAdvancedMachineFeaturesToHclTerraform; exports.computeRegionInstanceTemplateConfidentialInstanceConfigToTerraform = computeRegionInstanceTemplateConfidentialInstanceConfigToTerraform; exports.computeRegionInstanceTemplateConfidentialInstanceConfigToHclTerraform = computeRegionInstanceTemplateConfidentialInstanceConfigToHclTerraform; exports.computeRegionInstanceTemplateDiskDiskEncryptionKeyToTerraform = computeRegionInstanceTemplateDiskDiskEncryptionKeyToTerraform; exports.computeRegionInstanceTemplateDiskDiskEncryptionKeyToHclTerraform = computeRegionInstanceTemplateDiskDiskEncryptionKeyToHclTerraform; exports.computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToTerraform = computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToTerraform; exports.computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform = computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform; exports.computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform = computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform; exports.computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform = computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform; exports.computeRegionInstanceTemplateDiskToTerraform = computeRegionInstanceTemplateDiskToTerraform; exports.computeRegionInstanceTemplateDiskToHclTerraform = computeRegionInstanceTemplateDiskToHclTerraform; exports.computeRegionInstanceTemplateGuestAcceleratorToTerraform = computeRegionInstanceTemplateGuestAcceleratorToTerraform; exports.computeRegionInstanceTemplateGuestAcceleratorToHclTerraform = computeRegionInstanceTemplateGuestAcceleratorToHclTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceAccessConfigToTerraform = computeRegionInstanceTemplateNetworkInterfaceAccessConfigToTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceAccessConfigToHclTerraform = computeRegionInstanceTemplateNetworkInterfaceAccessConfigToHclTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceAliasIpRangeToTerraform = computeRegionInstanceTemplateNetworkInterfaceAliasIpRangeToTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceAliasIpRangeToHclTerraform = computeRegionInstanceTemplateNetworkInterfaceAliasIpRangeToHclTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigToTerraform = computeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigToTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigToHclTerraform = computeRegionInstanceTemplateNetworkInterfaceIpv6AccessConfigToHclTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceToTerraform = computeRegionInstanceTemplateNetworkInterfaceToTerraform; exports.computeRegionInstanceTemplateNetworkInterfaceToHclTerraform = computeRegionInstanceTemplateNetworkInterfaceToHclTerraform; exports.computeRegionInstanceTemplateNetworkPerformanceConfigToTerraform = computeRegionInstanceTemplateNetworkPerformanceConfigToTerraform; exports.computeRegionInstanceTemplateNetworkPerformanceConfigToHclTerraform = computeRegionInstanceTemplateNetworkPerformanceConfigToHclTerraform; exports.computeRegionInstanceTemplateReservationAffinitySpecificReservationToTerraform = computeRegionInstanceTemplateReservationAffinitySpecificReservationToTerraform; exports.computeRegionInstanceTemplateReservationAffinitySpecificReservationToHclTerraform = computeRegionInstanceTemplateReservationAffinitySpecificReservationToHclTerraform; exports.computeRegionInstanceTemplateReservationAffinityToTerraform = computeRegionInstanceTemplateReservationAffinityToTerraform; exports.computeRegionInstanceTemplateReservationAffinityToHclTerraform = computeRegionInstanceTemplateReservationAffinityToHclTerraform; exports.computeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToTerraform = computeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToTerraform; exports.computeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToHclTerraform = computeRegionInstanceTemplateSchedulingLocalSsdRecoveryTimeoutToHclTerraform; exports.computeRegionInstanceTemplateSchedulingMaxRunDurationToTerraform = computeRegionInstanceTemplateSchedulingMaxRunDurationToTerraform; exports.computeRegionInstanceTemplateSchedulingMaxRunDurationToHclTerraform = computeRegionInstanceTemplateSchedulingMaxRunDurationToHclTerraform; exports.computeRegionInstanceTemplateSchedulingNodeAffinitiesToTerraform = computeRegionInstanceTemplateSchedulingNodeAffinitiesToTerraform; exports.computeRegionInstanceTemplateSchedulingNodeAffinitiesToHclTerraform = computeRegionInstanceTemplateSchedulingNodeAffinitiesToHclTerraform; exports.computeRegionInstanceTemplateSchedulingOnInstanceStopActionToTerraform = computeRegionInstanceTemplateSchedulingOnInstanceStopActionToTerraform; exports.computeRegionInstanceTemplateSchedulingOnInstanceStopActionToHclTerraform = computeRegionInstanceTemplateSchedulingOnInstanceStopActionToHclTerraform; exports.computeRegionInstanceTemplateSchedulingToTerraform = computeRegionInstanceTemplateSchedulingToTerraform; exports.computeRegionInstanceTemplateSchedulingToHclTerraform = computeRegionInstanceTemplateSchedulingToHclTerraform; exports.computeRegionInstanceTemplateServiceAccountToTerraform = computeRegionInstanceTemplateServiceAccountToTerraform; exports.computeRegionInstanceTemplateServiceAccountToHclTerraform = computeRegionInstanceTemplateServiceAccountToHclTerraform; exports.computeRegionInstanceTemplateShieldedInstanceConfigToTerraform = computeRegionInstanceTemplateShieldedInstanceConfigToTerraform; exports.computeRegionInstanceTemplateShieldedInstanceConfigToHclTerraform = computeRegionInstanceTemplateShieldedInstanceConfigToHclTerraform; exports.computeRegionInstanceTemplateTimeoutsToTerraform = computeRegionInstanceTemplateTimeoutsToTerraform; exports.computeRegionInstanceTemplateTimeoutsToHclTerraform = computeRegionInstanceTemplateTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeRegionInstanceTemplateAdvancedMachineFeaturesToTerraform(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 computeRegionInstanceTemplateAdvancedMachineFeaturesToHclTerraform(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 ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference 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.ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference = ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference[_a] = { fqn: "@cdktf/provider-google.computeRegionInstanceTemplate.ComputeRegionInstanceTemplateAdvancedMachineFeaturesOutputReference", version: "14.35.1" }; function computeRegionInstanceTemplateConfidentialInstanceConfigToTerraform(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 computeRegionInstanceTemplateConfidentialInstanceConfigToHclTerraform(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 ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference 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.ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference = ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.computeRegionInstanceTemplate.ComputeRegionInstanceTemplateConfidentialInstanceConfigOutputReference", version: "14.35.1" }; function computeRegionInstanceTemplateDiskDiskEncryptionKeyToTerraform(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 computeRegionInstanceTemplateDiskDiskEncryptionKeyToHclTerraform(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 ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference 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.ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference = ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference[_c] = { fqn: "@cdktf/provider-google.computeRegionInstanceTemplate.ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference", version: "14.35.1" }; function computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToTerraform(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 computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform(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 ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference 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.ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference = ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference[_d] = { fqn: "@cdktf/provider-google.computeRegionInstanceTemplate.ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference", version: "14.35.1" }; function computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform(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 computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform(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 ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference 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.ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference = ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference[_e] = { fqn: "@cdktf/provider-google.computeRegionInstanceTemplate.ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference", version: "14.35.1" }; function computeRegionInstanceTemplateDiskToTerraform(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: computeRegionInstanceTemplateDiskDiskEncryptionKeyToTerraform(struct.diskEncryptionKey), source_image_encryption_key: computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToTerraform(struct.sourceImageEncryptionKey), source_snapshot_encryption_key: computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToTerraform(struct.sourceSnapshotEncryptionKey), }; } function computeRegionInstanceTemplateDiskToHclTerraform(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: computeRegionInstanceTemplateDiskDiskEncryptionKeyToHclTerraform(struct.diskEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeRegionInstanceTemplateDiskDiskEncryptionKeyList", }, source_image_encryption_key: { value: computeRegionInstanceTemplateDiskSourceImageEncryptionKeyToHclTerraform(struct.sourceImageEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyList", }, source_snapshot_encryption_key: { value: computeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyToHclTerraform(struct.sourceSnapshotEncryptionKey), isBlock: true, type: "list", storageClassType: "ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeRegionInstanceTemplateDiskOutputReference 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 ComputeRegionInstanceTemplateDiskDiskEncryptionKeyOutputReference(this, "disk_encryption_key"); // source_image_encryption_key - computed: false, optional: true, required: false this._sourceImageEncryptionKey = new ComputeRegionInstanceTemplateDiskSourceImageEncryptionKeyOutputReference(this, "source_image_encryption_key"); // source_snapshot_encryption_key - computed: false, optional: true, required: false this._sourceSnapshotEncryptionKey = new ComputeRegionInstanceTemplateDiskSourceSnapshotEncryptionKeyOutputReference(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 !== u