UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,165 lines 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, _7; Object.defineProperty(exports, "__esModule", { value: true }); exports.computeInstanceSchedulingLocalSsdRecoveryTimeoutToHclTerraform = exports.computeInstanceSchedulingLocalSsdRecoveryTimeoutToTerraform = exports.ComputeInstanceReservationAffinityOutputReference = exports.computeInstanceReservationAffinityToHclTerraform = exports.computeInstanceReservationAffinityToTerraform = exports.ComputeInstanceReservationAffinitySpecificReservationOutputReference = exports.computeInstanceReservationAffinitySpecificReservationToHclTerraform = exports.computeInstanceReservationAffinitySpecificReservationToTerraform = exports.ComputeInstanceParamsOutputReference = exports.computeInstanceParamsToHclTerraform = exports.computeInstanceParamsToTerraform = exports.ComputeInstanceNetworkPerformanceConfigOutputReference = exports.computeInstanceNetworkPerformanceConfigToHclTerraform = exports.computeInstanceNetworkPerformanceConfigToTerraform = exports.ComputeInstanceNetworkInterfaceList = exports.ComputeInstanceNetworkInterfaceOutputReference = exports.computeInstanceNetworkInterfaceToHclTerraform = exports.computeInstanceNetworkInterfaceToTerraform = exports.ComputeInstanceNetworkInterfaceIpv6AccessConfigList = exports.ComputeInstanceNetworkInterfaceIpv6AccessConfigOutputReference = exports.computeInstanceNetworkInterfaceIpv6AccessConfigToHclTerraform = exports.computeInstanceNetworkInterfaceIpv6AccessConfigToTerraform = exports.ComputeInstanceNetworkInterfaceAliasIpRangeList = exports.ComputeInstanceNetworkInterfaceAliasIpRangeOutputReference = exports.computeInstanceNetworkInterfaceAliasIpRangeToHclTerraform = exports.computeInstanceNetworkInterfaceAliasIpRangeToTerraform = exports.ComputeInstanceNetworkInterfaceAccessConfigList = exports.ComputeInstanceNetworkInterfaceAccessConfigOutputReference = exports.computeInstanceNetworkInterfaceAccessConfigToHclTerraform = exports.computeInstanceNetworkInterfaceAccessConfigToTerraform = exports.ComputeInstanceGuestAcceleratorList = exports.ComputeInstanceGuestAcceleratorOutputReference = exports.computeInstanceGuestAcceleratorToHclTerraform = exports.computeInstanceGuestAcceleratorToTerraform = exports.ComputeInstanceConfidentialInstanceConfigOutputReference = exports.computeInstanceConfidentialInstanceConfigToHclTerraform = exports.computeInstanceConfidentialInstanceConfigToTerraform = exports.ComputeInstanceBootDiskOutputReference = exports.computeInstanceBootDiskToHclTerraform = exports.computeInstanceBootDiskToTerraform = exports.ComputeInstanceBootDiskInitializeParamsOutputReference = exports.computeInstanceBootDiskInitializeParamsToHclTerraform = exports.computeInstanceBootDiskInitializeParamsToTerraform = exports.ComputeInstanceAttachedDiskList = exports.ComputeInstanceAttachedDiskOutputReference = exports.computeInstanceAttachedDiskToHclTerraform = exports.computeInstanceAttachedDiskToTerraform = exports.ComputeInstanceAdvancedMachineFeaturesOutputReference = exports.computeInstanceAdvancedMachineFeaturesToHclTerraform = exports.computeInstanceAdvancedMachineFeaturesToTerraform = void 0; exports.ComputeInstance = exports.ComputeInstanceTimeoutsOutputReference = exports.computeInstanceTimeoutsToHclTerraform = exports.computeInstanceTimeoutsToTerraform = exports.ComputeInstanceShieldedInstanceConfigOutputReference = exports.computeInstanceShieldedInstanceConfigToHclTerraform = exports.computeInstanceShieldedInstanceConfigToTerraform = exports.ComputeInstanceServiceAccountOutputReference = exports.computeInstanceServiceAccountToHclTerraform = exports.computeInstanceServiceAccountToTerraform = exports.ComputeInstanceScratchDiskList = exports.ComputeInstanceScratchDiskOutputReference = exports.computeInstanceScratchDiskToHclTerraform = exports.computeInstanceScratchDiskToTerraform = exports.ComputeInstanceSchedulingOutputReference = exports.computeInstanceSchedulingToHclTerraform = exports.computeInstanceSchedulingToTerraform = exports.ComputeInstanceSchedulingOnInstanceStopActionOutputReference = exports.computeInstanceSchedulingOnInstanceStopActionToHclTerraform = exports.computeInstanceSchedulingOnInstanceStopActionToTerraform = exports.ComputeInstanceSchedulingNodeAffinitiesList = exports.ComputeInstanceSchedulingNodeAffinitiesOutputReference = exports.computeInstanceSchedulingNodeAffinitiesToHclTerraform = exports.computeInstanceSchedulingNodeAffinitiesToTerraform = exports.ComputeInstanceSchedulingMaxRunDurationOutputReference = exports.computeInstanceSchedulingMaxRunDurationToHclTerraform = exports.computeInstanceSchedulingMaxRunDurationToTerraform = exports.ComputeInstanceSchedulingLocalSsdRecoveryTimeoutOutputReference = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeInstanceAdvancedMachineFeaturesToTerraform(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), }; } exports.computeInstanceAdvancedMachineFeaturesToTerraform = computeInstanceAdvancedMachineFeaturesToTerraform; function computeInstanceAdvancedMachineFeaturesToHclTerraform(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)); } exports.computeInstanceAdvancedMachineFeaturesToHclTerraform = computeInstanceAdvancedMachineFeaturesToHclTerraform; class ComputeInstanceAdvancedMachineFeaturesOutputReference 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.ComputeInstanceAdvancedMachineFeaturesOutputReference = ComputeInstanceAdvancedMachineFeaturesOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeInstanceAdvancedMachineFeaturesOutputReference[_a] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceAdvancedMachineFeaturesOutputReference", version: "14.12.0" }; function computeInstanceAttachedDiskToTerraform(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 { device_name: cdktf.stringToTerraform(struct.deviceName), disk_encryption_key_raw: cdktf.stringToTerraform(struct.diskEncryptionKeyRaw), kms_key_self_link: cdktf.stringToTerraform(struct.kmsKeySelfLink), mode: cdktf.stringToTerraform(struct.mode), source: cdktf.stringToTerraform(struct.source), }; } exports.computeInstanceAttachedDiskToTerraform = computeInstanceAttachedDiskToTerraform; function computeInstanceAttachedDiskToHclTerraform(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 = { device_name: { value: cdktf.stringToHclTerraform(struct.deviceName), isBlock: false, type: "simple", storageClassType: "string", }, disk_encryption_key_raw: { value: cdktf.stringToHclTerraform(struct.diskEncryptionKeyRaw), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_self_link: { value: cdktf.stringToHclTerraform(struct.kmsKeySelfLink), isBlock: false, type: "simple", storageClassType: "string", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, source: { value: cdktf.stringToHclTerraform(struct.source), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeInstanceAttachedDiskToHclTerraform = computeInstanceAttachedDiskToHclTerraform; class ComputeInstanceAttachedDiskOutputReference 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._deviceName !== undefined) { hasAnyValues = true; internalValueResult.deviceName = this._deviceName; } if (this._diskEncryptionKeyRaw !== undefined) { hasAnyValues = true; internalValueResult.diskEncryptionKeyRaw = this._diskEncryptionKeyRaw; } if (this._kmsKeySelfLink !== undefined) { hasAnyValues = true; internalValueResult.kmsKeySelfLink = this._kmsKeySelfLink; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._source !== undefined) { hasAnyValues = true; internalValueResult.source = this._source; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._deviceName = undefined; this._diskEncryptionKeyRaw = undefined; this._kmsKeySelfLink = undefined; this._mode = undefined; this._source = 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._deviceName = value.deviceName; this._diskEncryptionKeyRaw = value.diskEncryptionKeyRaw; this._kmsKeySelfLink = value.kmsKeySelfLink; this._mode = value.mode; this._source = value.source; } } get deviceName() { return this.getStringAttribute('device_name'); } set deviceName(value) { this._deviceName = value; } resetDeviceName() { this._deviceName = undefined; } // Temporarily expose input value. Use with caution. get deviceNameInput() { return this._deviceName; } get diskEncryptionKeyRaw() { return this.getStringAttribute('disk_encryption_key_raw'); } set diskEncryptionKeyRaw(value) { this._diskEncryptionKeyRaw = value; } resetDiskEncryptionKeyRaw() { this._diskEncryptionKeyRaw = undefined; } // Temporarily expose input value. Use with caution. get diskEncryptionKeyRawInput() { return this._diskEncryptionKeyRaw; } // disk_encryption_key_sha256 - computed: true, optional: false, required: false get diskEncryptionKeySha256() { return this.getStringAttribute('disk_encryption_key_sha256'); } 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 mode() { return this.getStringAttribute('mode'); } set mode(value) { this._mode = value; } resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } get source() { return this.getStringAttribute('source'); } set source(value) { this._source = value; } // Temporarily expose input value. Use with caution. get sourceInput() { return this._source; } } exports.ComputeInstanceAttachedDiskOutputReference = ComputeInstanceAttachedDiskOutputReference; _b = JSII_RTTI_SYMBOL_1; ComputeInstanceAttachedDiskOutputReference[_b] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceAttachedDiskOutputReference", version: "14.12.0" }; class ComputeInstanceAttachedDiskList 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 ComputeInstanceAttachedDiskOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeInstanceAttachedDiskList = ComputeInstanceAttachedDiskList; _c = JSII_RTTI_SYMBOL_1; ComputeInstanceAttachedDiskList[_c] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceAttachedDiskList", version: "14.12.0" }; function computeInstanceBootDiskInitializeParamsToTerraform(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_confidential_compute: cdktf.booleanToTerraform(struct.enableConfidentialCompute), image: cdktf.stringToTerraform(struct.image), labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), 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), size: cdktf.numberToTerraform(struct.size), storage_pool: cdktf.stringToTerraform(struct.storagePool), type: cdktf.stringToTerraform(struct.type), }; } exports.computeInstanceBootDiskInitializeParamsToTerraform = computeInstanceBootDiskInitializeParamsToTerraform; function computeInstanceBootDiskInitializeParamsToHclTerraform(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_confidential_compute: { value: cdktf.booleanToHclTerraform(struct.enableConfidentialCompute), isBlock: false, type: "simple", storageClassType: "boolean", }, image: { value: cdktf.stringToHclTerraform(struct.image), isBlock: false, type: "simple", storageClassType: "string", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, 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", }, size: { value: cdktf.numberToHclTerraform(struct.size), isBlock: false, type: "simple", storageClassType: "number", }, storage_pool: { value: cdktf.stringToHclTerraform(struct.storagePool), isBlock: false, type: "simple", storageClassType: "string", }, 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)); } exports.computeInstanceBootDiskInitializeParamsToHclTerraform = computeInstanceBootDiskInitializeParamsToHclTerraform; class ComputeInstanceBootDiskInitializeParamsOutputReference 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._enableConfidentialCompute !== undefined) { hasAnyValues = true; internalValueResult.enableConfidentialCompute = this._enableConfidentialCompute; } if (this._image !== undefined) { hasAnyValues = true; internalValueResult.image = this._image; } if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } 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._size !== undefined) { hasAnyValues = true; internalValueResult.size = this._size; } if (this._storagePool !== undefined) { hasAnyValues = true; internalValueResult.storagePool = this._storagePool; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enableConfidentialCompute = undefined; this._image = undefined; this._labels = undefined; this._provisionedIops = undefined; this._provisionedThroughput = undefined; this._resourceManagerTags = undefined; this._resourcePolicies = undefined; this._size = undefined; this._storagePool = undefined; this._type = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enableConfidentialCompute = value.enableConfidentialCompute; this._image = value.image; this._labels = value.labels; this._provisionedIops = value.provisionedIops; this._provisionedThroughput = value.provisionedThroughput; this._resourceManagerTags = value.resourceManagerTags; this._resourcePolicies = value.resourcePolicies; this._size = value.size; this._storagePool = value.storagePool; this._type = value.type; } } 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 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; } 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; } 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; } 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; } get resourcePolicies() { return this.getListAttribute('resource_policies'); } set resourcePolicies(value) { this._resourcePolicies = value; } resetResourcePolicies() { this._resourcePolicies = undefined; } // Temporarily expose input value. Use with caution. get resourcePoliciesInput() { return this._resourcePolicies; } 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 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 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; } } exports.ComputeInstanceBootDiskInitializeParamsOutputReference = ComputeInstanceBootDiskInitializeParamsOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeInstanceBootDiskInitializeParamsOutputReference[_d] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceBootDiskInitializeParamsOutputReference", version: "14.12.0" }; function computeInstanceBootDiskToTerraform(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 { auto_delete: cdktf.booleanToTerraform(struct.autoDelete), device_name: cdktf.stringToTerraform(struct.deviceName), disk_encryption_key_raw: cdktf.stringToTerraform(struct.diskEncryptionKeyRaw), interface: cdktf.stringToTerraform(struct.interface), kms_key_self_link: cdktf.stringToTerraform(struct.kmsKeySelfLink), mode: cdktf.stringToTerraform(struct.mode), source: cdktf.stringToTerraform(struct.source), initialize_params: computeInstanceBootDiskInitializeParamsToTerraform(struct.initializeParams), }; } exports.computeInstanceBootDiskToTerraform = computeInstanceBootDiskToTerraform; function computeInstanceBootDiskToHclTerraform(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 = { auto_delete: { value: cdktf.booleanToHclTerraform(struct.autoDelete), isBlock: false, type: "simple", storageClassType: "boolean", }, device_name: { value: cdktf.stringToHclTerraform(struct.deviceName), isBlock: false, type: "simple", storageClassType: "string", }, disk_encryption_key_raw: { value: cdktf.stringToHclTerraform(struct.diskEncryptionKeyRaw), isBlock: false, type: "simple", storageClassType: "string", }, interface: { value: cdktf.stringToHclTerraform(struct.interface), isBlock: false, type: "simple", storageClassType: "string", }, kms_key_self_link: { value: cdktf.stringToHclTerraform(struct.kmsKeySelfLink), isBlock: false, type: "simple", storageClassType: "string", }, mode: { value: cdktf.stringToHclTerraform(struct.mode), isBlock: false, type: "simple", storageClassType: "string", }, source: { value: cdktf.stringToHclTerraform(struct.source), isBlock: false, type: "simple", storageClassType: "string", }, initialize_params: { value: computeInstanceBootDiskInitializeParamsToHclTerraform(struct.initializeParams), isBlock: true, type: "list", storageClassType: "ComputeInstanceBootDiskInitializeParamsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.computeInstanceBootDiskToHclTerraform = computeInstanceBootDiskToHclTerraform; class ComputeInstanceBootDiskOutputReference 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; // initialize_params - computed: false, optional: true, required: false this._initializeParams = new ComputeInstanceBootDiskInitializeParamsOutputReference(this, "initialize_params"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._autoDelete !== undefined) { hasAnyValues = true; internalValueResult.autoDelete = this._autoDelete; } if (this._deviceName !== undefined) { hasAnyValues = true; internalValueResult.deviceName = this._deviceName; } if (this._diskEncryptionKeyRaw !== undefined) { hasAnyValues = true; internalValueResult.diskEncryptionKeyRaw = this._diskEncryptionKeyRaw; } if (this._interface !== undefined) { hasAnyValues = true; internalValueResult.interface = this._interface; } if (this._kmsKeySelfLink !== undefined) { hasAnyValues = true; internalValueResult.kmsKeySelfLink = this._kmsKeySelfLink; } if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } if (this._source !== undefined) { hasAnyValues = true; internalValueResult.source = this._source; } if (this._initializeParams?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.initializeParams = this._initializeParams?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._autoDelete = undefined; this._deviceName = undefined; this._diskEncryptionKeyRaw = undefined; this._interface = undefined; this._kmsKeySelfLink = undefined; this._mode = undefined; this._source = undefined; this._initializeParams.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._autoDelete = value.autoDelete; this._deviceName = value.deviceName; this._diskEncryptionKeyRaw = value.diskEncryptionKeyRaw; this._interface = value.interface; this._kmsKeySelfLink = value.kmsKeySelfLink; this._mode = value.mode; this._source = value.source; this._initializeParams.internalValue = value.initializeParams; } } get autoDelete() { return this.getBooleanAttribute('auto_delete'); } set autoDelete(value) { this._autoDelete = value; } resetAutoDelete() { this._autoDelete = undefined; } // Temporarily expose input value. Use with caution. get autoDeleteInput() { return this._autoDelete; } get deviceName() { return this.getStringAttribute('device_name'); } set deviceName(value) { this._deviceName = value; } resetDeviceName() { this._deviceName = undefined; } // Temporarily expose input value. Use with caution. get deviceNameInput() { return this._deviceName; } get diskEncryptionKeyRaw() { return this.getStringAttribute('disk_encryption_key_raw'); } set diskEncryptionKeyRaw(value) { this._diskEncryptionKeyRaw = value; } resetDiskEncryptionKeyRaw() { this._diskEncryptionKeyRaw = undefined; } // Temporarily expose input value. Use with caution. get diskEncryptionKeyRawInput() { return this._diskEncryptionKeyRaw; } // disk_encryption_key_sha256 - computed: true, optional: false, required: false get diskEncryptionKeySha256() { return this.getStringAttribute('disk_encryption_key_sha256'); } get interface() { return this.getStringAttribute('interface'); } set interface(value) { this._interface = value; } resetInterface() { this._interface = undefined; } // Temporarily expose input value. Use with caution. get interfaceInput() { return this._interface; } 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 mode() { return this.getStringAttribute('mode'); } set mode(value) { this._mode = value; } resetMode() { this._mode = undefined; } // Temporarily expose input value. Use with caution. get modeInput() { return this._mode; } get source() { return this.getStringAttribute('source'); } set source(value) { this._source = value; } resetSource() { this._source = undefined; } // Temporarily expose input value. Use with caution. get sourceInput() { return this._source; } get initializeParams() { return this._initializeParams; } putInitializeParams(value) { this._initializeParams.internalValue = value; } resetInitializeParams() { this._initializeParams.internalValue = undefined; } // Temporarily expose input value. Use with caution. get initializeParamsInput() { return this._initializeParams.internalValue; } } exports.ComputeInstanceBootDiskOutputReference = ComputeInstanceBootDiskOutputReference; _e = JSII_RTTI_SYMBOL_1; ComputeInstanceBootDiskOutputReference[_e] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceBootDiskOutputReference", version: "14.12.0" }; function computeInstanceConfidentialInstanceConfigToTerraform(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), }; } exports.computeInstanceConfidentialInstanceConfigToTerraform = computeInstanceConfidentialInstanceConfigToTerraform; function computeInstanceConfidentialInstanceConfigToHclTerraform(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)); } exports.computeInstanceConfidentialInstanceConfigToHclTerraform = computeInstanceConfidentialInstanceConfigToHclTerraform; class ComputeInstanceConfidentialInstanceConfigOutputReference 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.ComputeInstanceConfidentialInstanceConfigOutputReference = ComputeInstanceConfidentialInstanceConfigOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeInstanceConfidentialInstanceConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.computeInstance.ComputeInstanceConfidentialInstanceConfigOutputReference", version: "14.12.0" }; function computeInstanceGuestAcceleratorToTerraform(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 { count: cdktf.numberToTerraform(struct.count), type: cdktf.stringToTerraform(struct.type), }; } exports.computeInstanceGuestAcceleratorToTerraform = computeInstanceGuestAcceleratorToTerraform; function computeInstanceGuestAcceleratorToHclTerraform(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 = { count: { value: cdktf.numberToHclTerraform(struct.count), isBlock: false, type: "simple", storageClassType: "number", }, 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)); } exports.computeInstanceGuestAcceleratorToHclTerraform = computeInstanceGuestAcceleratorToHclTerraform; class ComputeInstanceGuestAcceleratorOutputReference 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._count !== undefined) { hasAnyValues = true; internalValueResult.count = this._count; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type;