UNPKG

@cdktf/provider-vsphere

Version:

Prebuilt vsphere Provider for Terraform CDK (cdktf)

1,146 lines 364 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComputeCluster = exports.ComputeClusterVsanStretchedClusterOutputReference = exports.ComputeClusterVsanFaultDomainsList = exports.ComputeClusterVsanFaultDomainsOutputReference = exports.ComputeClusterVsanFaultDomainsFaultDomainList = exports.ComputeClusterVsanFaultDomainsFaultDomainOutputReference = exports.ComputeClusterVsanDiskGroupList = exports.ComputeClusterVsanDiskGroupOutputReference = exports.ComputeClusterHostImageOutputReference = exports.ComputeClusterHostImageComponentList = exports.ComputeClusterHostImageComponentOutputReference = void 0; exports.computeClusterHostImageComponentToTerraform = computeClusterHostImageComponentToTerraform; exports.computeClusterHostImageComponentToHclTerraform = computeClusterHostImageComponentToHclTerraform; exports.computeClusterHostImageToTerraform = computeClusterHostImageToTerraform; exports.computeClusterHostImageToHclTerraform = computeClusterHostImageToHclTerraform; exports.computeClusterVsanDiskGroupToTerraform = computeClusterVsanDiskGroupToTerraform; exports.computeClusterVsanDiskGroupToHclTerraform = computeClusterVsanDiskGroupToHclTerraform; exports.computeClusterVsanFaultDomainsFaultDomainToTerraform = computeClusterVsanFaultDomainsFaultDomainToTerraform; exports.computeClusterVsanFaultDomainsFaultDomainToHclTerraform = computeClusterVsanFaultDomainsFaultDomainToHclTerraform; exports.computeClusterVsanFaultDomainsToTerraform = computeClusterVsanFaultDomainsToTerraform; exports.computeClusterVsanFaultDomainsToHclTerraform = computeClusterVsanFaultDomainsToHclTerraform; exports.computeClusterVsanStretchedClusterToTerraform = computeClusterVsanStretchedClusterToTerraform; exports.computeClusterVsanStretchedClusterToHclTerraform = computeClusterVsanStretchedClusterToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function computeClusterHostImageComponentToTerraform(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 { key: cdktf.stringToTerraform(struct.key), version: cdktf.stringToTerraform(struct.version), }; } function computeClusterHostImageComponentToHclTerraform(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 = { key: { value: cdktf.stringToHclTerraform(struct.key), isBlock: false, type: "simple", storageClassType: "string", }, version: { value: cdktf.stringToHclTerraform(struct.version), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterHostImageComponentOutputReference 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._key !== undefined) { hasAnyValues = true; internalValueResult.key = this._key; } if (this._version !== undefined) { hasAnyValues = true; internalValueResult.version = this._version; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._key = undefined; this._version = 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._key = value.key; this._version = value.version; } } get key() { return this.getStringAttribute('key'); } set key(value) { this._key = value; } resetKey() { this._key = undefined; } // Temporarily expose input value. Use with caution. get keyInput() { return this._key; } get version() { return this.getStringAttribute('version'); } set version(value) { this._version = value; } resetVersion() { this._version = undefined; } // Temporarily expose input value. Use with caution. get versionInput() { return this._version; } } exports.ComputeClusterHostImageComponentOutputReference = ComputeClusterHostImageComponentOutputReference; _a = JSII_RTTI_SYMBOL_1; ComputeClusterHostImageComponentOutputReference[_a] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterHostImageComponentOutputReference", version: "11.2.1" }; class ComputeClusterHostImageComponentList 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 ComputeClusterHostImageComponentOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeClusterHostImageComponentList = ComputeClusterHostImageComponentList; _b = JSII_RTTI_SYMBOL_1; ComputeClusterHostImageComponentList[_b] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterHostImageComponentList", version: "11.2.1" }; function computeClusterHostImageToTerraform(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 { esx_version: cdktf.stringToTerraform(struct.esxVersion), component: cdktf.listMapper(computeClusterHostImageComponentToTerraform, true)(struct.component), }; } function computeClusterHostImageToHclTerraform(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 = { esx_version: { value: cdktf.stringToHclTerraform(struct.esxVersion), isBlock: false, type: "simple", storageClassType: "string", }, component: { value: cdktf.listMapperHcl(computeClusterHostImageComponentToHclTerraform, true)(struct.component), isBlock: true, type: "list", storageClassType: "ComputeClusterHostImageComponentList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterHostImageOutputReference 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; // component - computed: false, optional: true, required: false this._component = new ComputeClusterHostImageComponentList(this, "component", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._esxVersion !== undefined) { hasAnyValues = true; internalValueResult.esxVersion = this._esxVersion; } if (this._component?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.component = this._component?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._esxVersion = undefined; this._component.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._esxVersion = value.esxVersion; this._component.internalValue = value.component; } } get esxVersion() { return this.getStringAttribute('esx_version'); } set esxVersion(value) { this._esxVersion = value; } resetEsxVersion() { this._esxVersion = undefined; } // Temporarily expose input value. Use with caution. get esxVersionInput() { return this._esxVersion; } get component() { return this._component; } putComponent(value) { this._component.internalValue = value; } resetComponent() { this._component.internalValue = undefined; } // Temporarily expose input value. Use with caution. get componentInput() { return this._component.internalValue; } } exports.ComputeClusterHostImageOutputReference = ComputeClusterHostImageOutputReference; _c = JSII_RTTI_SYMBOL_1; ComputeClusterHostImageOutputReference[_c] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterHostImageOutputReference", version: "11.2.1" }; function computeClusterVsanDiskGroupToTerraform(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 { cache: cdktf.stringToTerraform(struct.cache), storage: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.storage), }; } function computeClusterVsanDiskGroupToHclTerraform(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 = { cache: { value: cdktf.stringToHclTerraform(struct.cache), isBlock: false, type: "simple", storageClassType: "string", }, storage: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.storage), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterVsanDiskGroupOutputReference 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._cache !== undefined) { hasAnyValues = true; internalValueResult.cache = this._cache; } if (this._storage !== undefined) { hasAnyValues = true; internalValueResult.storage = this._storage; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._cache = undefined; this._storage = 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._cache = value.cache; this._storage = value.storage; } } get cache() { return this.getStringAttribute('cache'); } set cache(value) { this._cache = value; } resetCache() { this._cache = undefined; } // Temporarily expose input value. Use with caution. get cacheInput() { return this._cache; } get storage() { return cdktf.Fn.tolist(this.getListAttribute('storage')); } set storage(value) { this._storage = value; } resetStorage() { this._storage = undefined; } // Temporarily expose input value. Use with caution. get storageInput() { return this._storage; } } exports.ComputeClusterVsanDiskGroupOutputReference = ComputeClusterVsanDiskGroupOutputReference; _d = JSII_RTTI_SYMBOL_1; ComputeClusterVsanDiskGroupOutputReference[_d] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanDiskGroupOutputReference", version: "11.2.1" }; class ComputeClusterVsanDiskGroupList 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 ComputeClusterVsanDiskGroupOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeClusterVsanDiskGroupList = ComputeClusterVsanDiskGroupList; _e = JSII_RTTI_SYMBOL_1; ComputeClusterVsanDiskGroupList[_e] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanDiskGroupList", version: "11.2.1" }; function computeClusterVsanFaultDomainsFaultDomainToTerraform(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 { host_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.hostIds), name: cdktf.stringToTerraform(struct.name), }; } function computeClusterVsanFaultDomainsFaultDomainToHclTerraform(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 = { host_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.hostIds), isBlock: false, type: "set", storageClassType: "stringList", }, name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterVsanFaultDomainsFaultDomainOutputReference 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._hostIds !== undefined) { hasAnyValues = true; internalValueResult.hostIds = this._hostIds; } if (this._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._hostIds = undefined; this._name = 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._hostIds = value.hostIds; this._name = value.name; } } get hostIds() { return cdktf.Fn.tolist(this.getListAttribute('host_ids')); } set hostIds(value) { this._hostIds = value; } // Temporarily expose input value. Use with caution. get hostIdsInput() { return this._hostIds; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } } exports.ComputeClusterVsanFaultDomainsFaultDomainOutputReference = ComputeClusterVsanFaultDomainsFaultDomainOutputReference; _f = JSII_RTTI_SYMBOL_1; ComputeClusterVsanFaultDomainsFaultDomainOutputReference[_f] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanFaultDomainsFaultDomainOutputReference", version: "11.2.1" }; class ComputeClusterVsanFaultDomainsFaultDomainList 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 ComputeClusterVsanFaultDomainsFaultDomainOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeClusterVsanFaultDomainsFaultDomainList = ComputeClusterVsanFaultDomainsFaultDomainList; _g = JSII_RTTI_SYMBOL_1; ComputeClusterVsanFaultDomainsFaultDomainList[_g] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanFaultDomainsFaultDomainList", version: "11.2.1" }; function computeClusterVsanFaultDomainsToTerraform(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 { fault_domain: cdktf.listMapper(computeClusterVsanFaultDomainsFaultDomainToTerraform, true)(struct.faultDomain), }; } function computeClusterVsanFaultDomainsToHclTerraform(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 = { fault_domain: { value: cdktf.listMapperHcl(computeClusterVsanFaultDomainsFaultDomainToHclTerraform, true)(struct.faultDomain), isBlock: true, type: "set", storageClassType: "ComputeClusterVsanFaultDomainsFaultDomainList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterVsanFaultDomainsOutputReference 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; // fault_domain - computed: false, optional: true, required: false this._faultDomain = new ComputeClusterVsanFaultDomainsFaultDomainList(this, "fault_domain", true); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._faultDomain?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.faultDomain = this._faultDomain?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._faultDomain.internalValue = 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._faultDomain.internalValue = value.faultDomain; } } get faultDomain() { return this._faultDomain; } putFaultDomain(value) { this._faultDomain.internalValue = value; } resetFaultDomain() { this._faultDomain.internalValue = undefined; } // Temporarily expose input value. Use with caution. get faultDomainInput() { return this._faultDomain.internalValue; } } exports.ComputeClusterVsanFaultDomainsOutputReference = ComputeClusterVsanFaultDomainsOutputReference; _h = JSII_RTTI_SYMBOL_1; ComputeClusterVsanFaultDomainsOutputReference[_h] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanFaultDomainsOutputReference", version: "11.2.1" }; class ComputeClusterVsanFaultDomainsList 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 ComputeClusterVsanFaultDomainsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ComputeClusterVsanFaultDomainsList = ComputeClusterVsanFaultDomainsList; _j = JSII_RTTI_SYMBOL_1; ComputeClusterVsanFaultDomainsList[_j] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanFaultDomainsList", version: "11.2.1" }; function computeClusterVsanStretchedClusterToTerraform(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 { preferred_fault_domain_host_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.preferredFaultDomainHostIds), preferred_fault_domain_name: cdktf.stringToTerraform(struct.preferredFaultDomainName), secondary_fault_domain_host_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.secondaryFaultDomainHostIds), secondary_fault_domain_name: cdktf.stringToTerraform(struct.secondaryFaultDomainName), witness_node: cdktf.stringToTerraform(struct.witnessNode), }; } function computeClusterVsanStretchedClusterToHclTerraform(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 = { preferred_fault_domain_host_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.preferredFaultDomainHostIds), isBlock: false, type: "set", storageClassType: "stringList", }, preferred_fault_domain_name: { value: cdktf.stringToHclTerraform(struct.preferredFaultDomainName), isBlock: false, type: "simple", storageClassType: "string", }, secondary_fault_domain_host_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.secondaryFaultDomainHostIds), isBlock: false, type: "set", storageClassType: "stringList", }, secondary_fault_domain_name: { value: cdktf.stringToHclTerraform(struct.secondaryFaultDomainName), isBlock: false, type: "simple", storageClassType: "string", }, witness_node: { value: cdktf.stringToHclTerraform(struct.witnessNode), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ComputeClusterVsanStretchedClusterOutputReference 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._preferredFaultDomainHostIds !== undefined) { hasAnyValues = true; internalValueResult.preferredFaultDomainHostIds = this._preferredFaultDomainHostIds; } if (this._preferredFaultDomainName !== undefined) { hasAnyValues = true; internalValueResult.preferredFaultDomainName = this._preferredFaultDomainName; } if (this._secondaryFaultDomainHostIds !== undefined) { hasAnyValues = true; internalValueResult.secondaryFaultDomainHostIds = this._secondaryFaultDomainHostIds; } if (this._secondaryFaultDomainName !== undefined) { hasAnyValues = true; internalValueResult.secondaryFaultDomainName = this._secondaryFaultDomainName; } if (this._witnessNode !== undefined) { hasAnyValues = true; internalValueResult.witnessNode = this._witnessNode; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._preferredFaultDomainHostIds = undefined; this._preferredFaultDomainName = undefined; this._secondaryFaultDomainHostIds = undefined; this._secondaryFaultDomainName = undefined; this._witnessNode = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._preferredFaultDomainHostIds = value.preferredFaultDomainHostIds; this._preferredFaultDomainName = value.preferredFaultDomainName; this._secondaryFaultDomainHostIds = value.secondaryFaultDomainHostIds; this._secondaryFaultDomainName = value.secondaryFaultDomainName; this._witnessNode = value.witnessNode; } } get preferredFaultDomainHostIds() { return cdktf.Fn.tolist(this.getListAttribute('preferred_fault_domain_host_ids')); } set preferredFaultDomainHostIds(value) { this._preferredFaultDomainHostIds = value; } // Temporarily expose input value. Use with caution. get preferredFaultDomainHostIdsInput() { return this._preferredFaultDomainHostIds; } get preferredFaultDomainName() { return this.getStringAttribute('preferred_fault_domain_name'); } set preferredFaultDomainName(value) { this._preferredFaultDomainName = value; } resetPreferredFaultDomainName() { this._preferredFaultDomainName = undefined; } // Temporarily expose input value. Use with caution. get preferredFaultDomainNameInput() { return this._preferredFaultDomainName; } get secondaryFaultDomainHostIds() { return cdktf.Fn.tolist(this.getListAttribute('secondary_fault_domain_host_ids')); } set secondaryFaultDomainHostIds(value) { this._secondaryFaultDomainHostIds = value; } // Temporarily expose input value. Use with caution. get secondaryFaultDomainHostIdsInput() { return this._secondaryFaultDomainHostIds; } get secondaryFaultDomainName() { return this.getStringAttribute('secondary_fault_domain_name'); } set secondaryFaultDomainName(value) { this._secondaryFaultDomainName = value; } resetSecondaryFaultDomainName() { this._secondaryFaultDomainName = undefined; } // Temporarily expose input value. Use with caution. get secondaryFaultDomainNameInput() { return this._secondaryFaultDomainName; } get witnessNode() { return this.getStringAttribute('witness_node'); } set witnessNode(value) { this._witnessNode = value; } // Temporarily expose input value. Use with caution. get witnessNodeInput() { return this._witnessNode; } } exports.ComputeClusterVsanStretchedClusterOutputReference = ComputeClusterVsanStretchedClusterOutputReference; _k = JSII_RTTI_SYMBOL_1; ComputeClusterVsanStretchedClusterOutputReference[_k] = { fqn: "@cdktf/provider-vsphere.computeCluster.ComputeClusterVsanStretchedClusterOutputReference", version: "11.2.1" }; /** * Represents a {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/compute_cluster vsphere_compute_cluster} */ class ComputeCluster extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ComputeCluster resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the ComputeCluster to import * @param importFromId The id of the existing ComputeCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/compute_cluster#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ComputeCluster to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "vsphere_compute_cluster", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/vmware/vsphere/2.15.0/docs/resources/compute_cluster vsphere_compute_cluster} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options ComputeClusterConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'vsphere_compute_cluster', terraformGeneratorMetadata: { providerName: 'vsphere', providerVersion: '2.15.0', providerVersionConstraint: '~> 2.13' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // host_image - computed: false, optional: true, required: false this._hostImage = new ComputeClusterHostImageOutputReference(this, "host_image"); // vsan_disk_group - computed: false, optional: true, required: false this._vsanDiskGroup = new ComputeClusterVsanDiskGroupList(this, "vsan_disk_group", false); // vsan_fault_domains - computed: false, optional: true, required: false this._vsanFaultDomains = new ComputeClusterVsanFaultDomainsList(this, "vsan_fault_domains", true); // vsan_stretched_cluster - computed: false, optional: true, required: false this._vsanStretchedCluster = new ComputeClusterVsanStretchedClusterOutputReference(this, "vsan_stretched_cluster"); this._customAttributes = config.customAttributes; this._datacenterId = config.datacenterId; this._dpmAutomationLevel = config.dpmAutomationLevel; this._dpmEnabled = config.dpmEnabled; this._dpmThreshold = config.dpmThreshold; this._drsAdvancedOptions = config.drsAdvancedOptions; this._drsAutomationLevel = config.drsAutomationLevel; this._drsEnablePredictiveDrs = config.drsEnablePredictiveDrs; this._drsEnableVmOverrides = config.drsEnableVmOverrides; this._drsEnabled = config.drsEnabled; this._drsMigrationThreshold = config.drsMigrationThreshold; this._drsScaleDescendantsShares = config.drsScaleDescendantsShares; this._folder = config.folder; this._forceEvacuateOnDestroy = config.forceEvacuateOnDestroy; this._haAdmissionControlFailoverHostSystemIds = config.haAdmissionControlFailoverHostSystemIds; this._haAdmissionControlHostFailureTolerance = config.haAdmissionControlHostFailureTolerance; this._haAdmissionControlPerformanceTolerance = config.haAdmissionControlPerformanceTolerance; this._haAdmissionControlPolicy = config.haAdmissionControlPolicy; this._haAdmissionControlResourcePercentageAutoCompute = config.haAdmissionControlResourcePercentageAutoCompute; this._haAdmissionControlResourcePercentageCpu = config.haAdmissionControlResourcePercentageCpu; this._haAdmissionControlResourcePercentageMemory = config.haAdmissionControlResourcePercentageMemory; this._haAdmissionControlSlotPolicyExplicitCpu = config.haAdmissionControlSlotPolicyExplicitCpu; this._haAdmissionControlSlotPolicyExplicitMemory = config.haAdmissionControlSlotPolicyExplicitMemory; this._haAdmissionControlSlotPolicyUseExplicitSize = config.haAdmissionControlSlotPolicyUseExplicitSize; this._haAdvancedOptions = config.haAdvancedOptions; this._haDatastoreApdRecoveryAction = config.haDatastoreApdRecoveryAction; this._haDatastoreApdResponse = config.haDatastoreApdResponse; this._haDatastoreApdResponseDelay = config.haDatastoreApdResponseDelay; this._haDatastorePdlResponse = config.haDatastorePdlResponse; this._haEnabled = config.haEnabled; this._haHeartbeatDatastoreIds = config.haHeartbeatDatastoreIds; this._haHeartbeatDatastorePolicy = config.haHeartbeatDatastorePolicy; this._haHostIsolationResponse = config.haHostIsolationResponse; this._haHostMonitoring = config.haHostMonitoring; this._haVmComponentProtection = config.haVmComponentProtection; this._haVmDependencyRestartCondition = config.haVmDependencyRestartCondition; this._haVmFailureInterval = config.haVmFailureInterval; this._haVmMaximumFailureWindow = config.haVmMaximumFailureWindow; this._haVmMaximumResets = config.haVmMaximumResets; this._haVmMinimumUptime = config.haVmMinimumUptime; this._haVmMonitoring = config.haVmMonitoring; this._haVmRestartAdditionalDelay = config.haVmRestartAdditionalDelay; this._haVmRestartPriority = config.haVmRestartPriority; this._haVmRestartTimeout = config.haVmRestartTimeout; this._hostClusterExitTimeout = config.hostClusterExitTimeout; this._hostManaged = config.hostManaged; this._hostSystemIds = config.hostSystemIds; this._id = config.id; this._name = config.name; this._proactiveHaAutomationLevel = config.proactiveHaAutomationLevel; this._proactiveHaEnabled = config.proactiveHaEnabled; this._proactiveHaModerateRemediation = config.proactiveHaModerateRemediation; this._proactiveHaProviderIds = config.proactiveHaProviderIds; this._proactiveHaSevereRemediation = config.proactiveHaSevereRemediation; this._tags = config.tags; this._vsanCompressionEnabled = config.vsanCompressionEnabled; this._vsanDedupEnabled = config.vsanDedupEnabled; this._vsanDitEncryptionEnabled = config.vsanDitEncryptionEnabled; this._vsanDitRekeyInterval = config.vsanDitRekeyInterval; this._vsanEnabled = config.vsanEnabled; this._vsanEsaEnabled = config.vsanEsaEnabled; this._vsanNetworkDiagnosticModeEnabled = config.vsanNetworkDiagnosticModeEnabled; this._vsanPerformanceEnabled = config.vsanPerformanceEnabled; this._vsanRemoteDatastoreIds = config.vsanRemoteDatastoreIds; this._vsanUnmapEnabled = config.vsanUnmapEnabled; this._vsanVerboseModeEnabled = config.vsanVerboseModeEnabled; this._hostImage.internalValue = config.hostImage; this._vsanDiskGroup.internalValue = config.vsanDiskGroup; this._vsanFaultDomains.internalValue = config.vsanFaultDomains; this._vsanStretchedCluster.internalValue = config.vsanStretchedCluster; } get customAttributes() { return this.getStringMapAttribute('custom_attributes'); } set customAttributes(value) { this._customAttributes = value; } resetCustomAttributes() { this._customAttributes = undefined; } // Temporarily expose input value. Use with caution. get customAttributesInput() { return this._customAttributes; } get datacenterId() { return this.getStringAttribute('datacenter_id'); } set datacenterId(value) { this._datacenterId = value; } // Temporarily expose input value. Use with caution. get datacenterIdInput() { return this._datacenterId; } get dpmAutomationLevel() { return this.getStringAttribute('dpm_automation_level'); } set dpmAutomationLevel(value) { this._dpmAutomationLevel = value; } resetDpmAutomationLevel() { this._dpmAutomationLevel = undefined; } // Temporarily expose input value. Use with caution. get dpmAutomationLevelInput() { return this._dpmAutomationLevel; } get dpmEnabled() { return this.getBooleanAttribute('dpm_enabled'); } set dpmEnabled(value) { this._dpmEnabled = value; } resetDpmEnabled() { this._dpmEnabled = undefined; } // Temporarily expose input value. Use with caution. get dpmEnabledInput() { return this._dpmEnabled; } get dpmThreshold() { return this.getNumberAttribute('dpm_threshold'); } set dpmThreshold(value) { this._dpmThreshold = value; } resetDpmThreshold() { this._dpmThreshold = undefined; } // Temporarily expose input value. Use with caution. get dpmThresholdInput() { return this._dpmThreshold; } get drsAdvancedOptions() { return this.getStringMapAttribute('drs_advanced_options'); } set drsAdvancedOptions(value) { this._drsAdvancedOptions = value; } resetDrsAdvancedOptions() { this._drsAdvancedOptions = undefined; } // Temporarily expose input value. Use with caution. get drsAdvancedOptionsInput() { return this._drsAdvancedOptions; } get drsAutomationLevel() { return this.getStringAttribute('drs_automation_level'); } set drsAutomationLevel(value) { this._drsAutomationLevel = value; } resetDrsAutomationLevel() { this._drsAutomationLevel = undefined; } // Temporarily expose input value. Use with caution. get drsAutomationLevelInput() { return this._drsAutomationLevel; } get drsEnablePredictiveDrs() { return this.getBooleanAttribute('drs_enable_predictive_drs'); } set drsEnablePredictiveDrs(value) { this._drsEnablePredictiveDrs = value; } resetDrsEnablePredictiveDrs() { this._drsEnablePredictiveDrs = undefined; } // Temporarily expose input value. Use with caution. get drsEnablePredictiveDrsInput() { return this._drsEnablePredictiveDrs; } get drsEnableVmOverrides() { return this.getBooleanAttribute('drs_enable_vm_overrides'); } set drsEnableVmOverrides(value) { this._drsEnableVmOverrides = value; } resetDrsEnableVmOverrides() { this._drsEnableVmOverrides = undefined; } // Temporarily expose input value. Use with caution. get drsEnableVmOverridesInput() { return this._drsEnableVmOverrides; } get drsEnabled() { return this.getBooleanAttribute('drs_enabled'); } set drsEnabled(value) { this._drsEnabled = value; } resetDrsEnabled() { this._drsEnabled = undefined; } // Temporarily expose input value. Use with caution. get drsEnabledInput() { return this._drsEnabled; } get drsMigrationThreshold() { return this.getNumberAttribute('drs_migration_threshold'); } set drsMigrationThreshold(value) { this._drsMigrationThreshold = value; } resetDrsMigrationThreshold() { this._drsMigrationThreshold = undefined; } // Temporarily expose input value. Use with caution. get drsMigrationThresholdInput() { return this._drsMigrationThreshold; } get drsScaleDescendantsShares() { return this.getStringAttribute('drs_scale_descendants_shares'); } set drsScaleDescendantsShares(value) { this._drsScaleDescendantsShares = value; } resetDrsScaleDescendantsShares() { this._drsScaleDescendantsShares = undefined; } // Temporarily expose input value. Use with caution. get drsScaleDescendantsSharesInput() { return this._drsScaleDescendantsShares; } get folder() { return this.getStringAttribute('folder'); } set folder(value) { this._folder = value; } resetFolder() { this._folder = undefined; } // Temporarily expose input value. Use with caution. get folderInput() { return this._folder; } get forceEvacuateOnDestroy() { return this.getBooleanAttribute('force_evacuate_on_destroy'); } set forceEvacuateOnDestroy(value) { this._forceEvacuateOnDestroy = value; } resetForceEvacuateOnDestroy() { this._forceEvacuateOnDestroy = undefined; } // Temporarily expose input value. Use with caution. get forceEvacuateOnDestroyInput() { return this._forceEvacuateOnDestroy; } get haAdmissionControlFailoverHostSystemIds() { return cdktf.Fn.tolist(this.getListAttribute('ha_admission_control_failover_host_system_ids')); } set haAdmissionControlFailoverHostSystemIds(value) { this._haAdmissionControlFailoverHostSystemIds = value; } resetHaAdmissionControlFailoverHostSystemIds() { this._haAdmissionControlFailoverHostSystemIds = undefined; } // Temporarily expose input value. Use with caution. get haAdmissionControlFailoverHostSystemIdsInput() { return this._haAdmissionControlFailoverHostSystemIds; } get haAdmissionControlHostFailureTolerance() { return this.getNumberAttribute('ha_admission_control_host_failure_tolerance'); } set haAdmissionControlHostFailureTolerance(value) { this._haAdmissionControlHostFailureTolerance = value; } resetHaAdmissionControlHostFailureTolerance() { this._haAdmissionControlHostFailureTolerance = undefined; } // Temporarily expose input value. Use with caution. get haAdmissionControlHostFailureToleranceInput() { return this._haAdmissionControlHostFailureTolerance; } get haAdmissionControlPerformanceTolerance() { return this.getNumberAttribute('ha_admission_control_performance_tolerance'); } set haAdmissionControlPerformanceTolerance(value) { this._haAdmissionControlPerformanceTolerance = value; } resetHaAdmissionControlPerformanceTolerance() { this._haAdmissionControlPerformanceTolerance = undefined; } // Temporarily expose input value. Use with caution. get haAdmissionControlPerformanceToleranceInput() { return this._haAdmissionControlPerformanceTolerance; } get haAdmissionControlPolicy() { return this.getStringAttribute('ha_admission_control_policy'); } set haAdmissionControlPolicy(value) { this._haAdmissionControlPolicy = value; } resetHaAdmissionControlPolicy() { this._haAdmissionControlPolicy = undefined; } // Temporarily expose input value. Use with caution. get haAdmissionControlPolicyInput() { return this._haAdmissionControlPolicy; } get haAdmissionControlResourcePercentageAutoCompute() { return this.getBooleanAttribute('ha_admission_control_resource_percen