UNPKG

@cdktf/provider-azurerm

Version:

Prebuilt azurerm Provider for Terraform CDK (cdktf)

1,159 lines 175 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.LighthouseDefinition = exports.LighthouseDefinitionTimeoutsOutputReference = exports.lighthouseDefinitionTimeoutsToHclTerraform = exports.lighthouseDefinitionTimeoutsToTerraform = exports.LighthouseDefinitionPlanOutputReference = exports.lighthouseDefinitionPlanToHclTerraform = exports.lighthouseDefinitionPlanToTerraform = exports.LighthouseDefinitionEligibleAuthorizationList = exports.LighthouseDefinitionEligibleAuthorizationOutputReference = exports.lighthouseDefinitionEligibleAuthorizationToHclTerraform = exports.lighthouseDefinitionEligibleAuthorizationToTerraform = exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference = exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToHclTerraform = exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToTerraform = exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList = exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference = exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToHclTerraform = exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToTerraform = exports.LighthouseDefinitionAuthorizationList = exports.LighthouseDefinitionAuthorizationOutputReference = exports.lighthouseDefinitionAuthorizationToHclTerraform = exports.lighthouseDefinitionAuthorizationToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function lighthouseDefinitionAuthorizationToTerraform(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 { delegated_role_definition_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.delegatedRoleDefinitionIds), principal_display_name: cdktf.stringToTerraform(struct.principalDisplayName), principal_id: cdktf.stringToTerraform(struct.principalId), role_definition_id: cdktf.stringToTerraform(struct.roleDefinitionId), }; } exports.lighthouseDefinitionAuthorizationToTerraform = lighthouseDefinitionAuthorizationToTerraform; function lighthouseDefinitionAuthorizationToHclTerraform(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 = { delegated_role_definition_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.delegatedRoleDefinitionIds), isBlock: false, type: "set", storageClassType: "stringList", }, principal_display_name: { value: cdktf.stringToHclTerraform(struct.principalDisplayName), isBlock: false, type: "simple", storageClassType: "string", }, principal_id: { value: cdktf.stringToHclTerraform(struct.principalId), isBlock: false, type: "simple", storageClassType: "string", }, role_definition_id: { value: cdktf.stringToHclTerraform(struct.roleDefinitionId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lighthouseDefinitionAuthorizationToHclTerraform = lighthouseDefinitionAuthorizationToHclTerraform; class LighthouseDefinitionAuthorizationOutputReference 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._delegatedRoleDefinitionIds !== undefined) { hasAnyValues = true; internalValueResult.delegatedRoleDefinitionIds = this._delegatedRoleDefinitionIds; } if (this._principalDisplayName !== undefined) { hasAnyValues = true; internalValueResult.principalDisplayName = this._principalDisplayName; } if (this._principalId !== undefined) { hasAnyValues = true; internalValueResult.principalId = this._principalId; } if (this._roleDefinitionId !== undefined) { hasAnyValues = true; internalValueResult.roleDefinitionId = this._roleDefinitionId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._delegatedRoleDefinitionIds = undefined; this._principalDisplayName = undefined; this._principalId = undefined; this._roleDefinitionId = 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._delegatedRoleDefinitionIds = value.delegatedRoleDefinitionIds; this._principalDisplayName = value.principalDisplayName; this._principalId = value.principalId; this._roleDefinitionId = value.roleDefinitionId; } } get delegatedRoleDefinitionIds() { return cdktf.Fn.tolist(this.getListAttribute('delegated_role_definition_ids')); } set delegatedRoleDefinitionIds(value) { this._delegatedRoleDefinitionIds = value; } resetDelegatedRoleDefinitionIds() { this._delegatedRoleDefinitionIds = undefined; } // Temporarily expose input value. Use with caution. get delegatedRoleDefinitionIdsInput() { return this._delegatedRoleDefinitionIds; } get principalDisplayName() { return this.getStringAttribute('principal_display_name'); } set principalDisplayName(value) { this._principalDisplayName = value; } resetPrincipalDisplayName() { this._principalDisplayName = undefined; } // Temporarily expose input value. Use with caution. get principalDisplayNameInput() { return this._principalDisplayName; } get principalId() { return this.getStringAttribute('principal_id'); } set principalId(value) { this._principalId = value; } // Temporarily expose input value. Use with caution. get principalIdInput() { return this._principalId; } get roleDefinitionId() { return this.getStringAttribute('role_definition_id'); } set roleDefinitionId(value) { this._roleDefinitionId = value; } // Temporarily expose input value. Use with caution. get roleDefinitionIdInput() { return this._roleDefinitionId; } } exports.LighthouseDefinitionAuthorizationOutputReference = LighthouseDefinitionAuthorizationOutputReference; _a = JSII_RTTI_SYMBOL_1; LighthouseDefinitionAuthorizationOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionAuthorizationOutputReference", version: "12.27.0" }; class LighthouseDefinitionAuthorizationList 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 LighthouseDefinitionAuthorizationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LighthouseDefinitionAuthorizationList = LighthouseDefinitionAuthorizationList; _b = JSII_RTTI_SYMBOL_1; LighthouseDefinitionAuthorizationList[_b] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionAuthorizationList", version: "12.27.0" }; function lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToTerraform(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 { principal_display_name: cdktf.stringToTerraform(struct.principalDisplayName), principal_id: cdktf.stringToTerraform(struct.principalId), }; } exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToTerraform = lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToTerraform; function lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToHclTerraform(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 = { principal_display_name: { value: cdktf.stringToHclTerraform(struct.principalDisplayName), isBlock: false, type: "simple", storageClassType: "string", }, principal_id: { value: cdktf.stringToHclTerraform(struct.principalId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToHclTerraform = lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToHclTerraform; class LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference 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._principalDisplayName !== undefined) { hasAnyValues = true; internalValueResult.principalDisplayName = this._principalDisplayName; } if (this._principalId !== undefined) { hasAnyValues = true; internalValueResult.principalId = this._principalId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._principalDisplayName = undefined; this._principalId = 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._principalDisplayName = value.principalDisplayName; this._principalId = value.principalId; } } get principalDisplayName() { return this.getStringAttribute('principal_display_name'); } set principalDisplayName(value) { this._principalDisplayName = value; } resetPrincipalDisplayName() { this._principalDisplayName = undefined; } // Temporarily expose input value. Use with caution. get principalDisplayNameInput() { return this._principalDisplayName; } get principalId() { return this.getStringAttribute('principal_id'); } set principalId(value) { this._principalId = value; } // Temporarily expose input value. Use with caution. get principalIdInput() { return this._principalId; } } exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference = LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference; _c = JSII_RTTI_SYMBOL_1; LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference", version: "12.27.0" }; class LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList 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 LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList = LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList; _d = JSII_RTTI_SYMBOL_1; LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList[_d] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList", version: "12.27.0" }; function lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToTerraform(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 { maximum_activation_duration: cdktf.stringToTerraform(struct.maximumActivationDuration), multi_factor_auth_provider: cdktf.stringToTerraform(struct.multiFactorAuthProvider), approver: cdktf.listMapper(lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToTerraform, true)(struct.approver), }; } exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToTerraform = lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToTerraform; function lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToHclTerraform(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 = { maximum_activation_duration: { value: cdktf.stringToHclTerraform(struct.maximumActivationDuration), isBlock: false, type: "simple", storageClassType: "string", }, multi_factor_auth_provider: { value: cdktf.stringToHclTerraform(struct.multiFactorAuthProvider), isBlock: false, type: "simple", storageClassType: "string", }, approver: { value: cdktf.listMapperHcl(lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverToHclTerraform, true)(struct.approver), isBlock: true, type: "set", storageClassType: "LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToHclTerraform = lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToHclTerraform; class LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference 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; // approver - computed: false, optional: true, required: false this._approver = new LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyApproverList(this, "approver", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._maximumActivationDuration !== undefined) { hasAnyValues = true; internalValueResult.maximumActivationDuration = this._maximumActivationDuration; } if (this._multiFactorAuthProvider !== undefined) { hasAnyValues = true; internalValueResult.multiFactorAuthProvider = this._multiFactorAuthProvider; } if (this._approver?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.approver = this._approver?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maximumActivationDuration = undefined; this._multiFactorAuthProvider = undefined; this._approver.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maximumActivationDuration = value.maximumActivationDuration; this._multiFactorAuthProvider = value.multiFactorAuthProvider; this._approver.internalValue = value.approver; } } get maximumActivationDuration() { return this.getStringAttribute('maximum_activation_duration'); } set maximumActivationDuration(value) { this._maximumActivationDuration = value; } resetMaximumActivationDuration() { this._maximumActivationDuration = undefined; } // Temporarily expose input value. Use with caution. get maximumActivationDurationInput() { return this._maximumActivationDuration; } get multiFactorAuthProvider() { return this.getStringAttribute('multi_factor_auth_provider'); } set multiFactorAuthProvider(value) { this._multiFactorAuthProvider = value; } resetMultiFactorAuthProvider() { this._multiFactorAuthProvider = undefined; } // Temporarily expose input value. Use with caution. get multiFactorAuthProviderInput() { return this._multiFactorAuthProvider; } get approver() { return this._approver; } putApprover(value) { this._approver.internalValue = value; } resetApprover() { this._approver.internalValue = undefined; } // Temporarily expose input value. Use with caution. get approverInput() { return this._approver.internalValue; } } exports.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference = LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference; _e = JSII_RTTI_SYMBOL_1; LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference", version: "12.27.0" }; function lighthouseDefinitionEligibleAuthorizationToTerraform(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 { principal_display_name: cdktf.stringToTerraform(struct.principalDisplayName), principal_id: cdktf.stringToTerraform(struct.principalId), role_definition_id: cdktf.stringToTerraform(struct.roleDefinitionId), just_in_time_access_policy: lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToTerraform(struct.justInTimeAccessPolicy), }; } exports.lighthouseDefinitionEligibleAuthorizationToTerraform = lighthouseDefinitionEligibleAuthorizationToTerraform; function lighthouseDefinitionEligibleAuthorizationToHclTerraform(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 = { principal_display_name: { value: cdktf.stringToHclTerraform(struct.principalDisplayName), isBlock: false, type: "simple", storageClassType: "string", }, principal_id: { value: cdktf.stringToHclTerraform(struct.principalId), isBlock: false, type: "simple", storageClassType: "string", }, role_definition_id: { value: cdktf.stringToHclTerraform(struct.roleDefinitionId), isBlock: false, type: "simple", storageClassType: "string", }, just_in_time_access_policy: { value: lighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyToHclTerraform(struct.justInTimeAccessPolicy), isBlock: true, type: "list", storageClassType: "LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lighthouseDefinitionEligibleAuthorizationToHclTerraform = lighthouseDefinitionEligibleAuthorizationToHclTerraform; class LighthouseDefinitionEligibleAuthorizationOutputReference 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; // just_in_time_access_policy - computed: false, optional: true, required: false this._justInTimeAccessPolicy = new LighthouseDefinitionEligibleAuthorizationJustInTimeAccessPolicyOutputReference(this, "just_in_time_access_policy"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._principalDisplayName !== undefined) { hasAnyValues = true; internalValueResult.principalDisplayName = this._principalDisplayName; } if (this._principalId !== undefined) { hasAnyValues = true; internalValueResult.principalId = this._principalId; } if (this._roleDefinitionId !== undefined) { hasAnyValues = true; internalValueResult.roleDefinitionId = this._roleDefinitionId; } if (this._justInTimeAccessPolicy?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.justInTimeAccessPolicy = this._justInTimeAccessPolicy?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._principalDisplayName = undefined; this._principalId = undefined; this._roleDefinitionId = undefined; this._justInTimeAccessPolicy.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._principalDisplayName = value.principalDisplayName; this._principalId = value.principalId; this._roleDefinitionId = value.roleDefinitionId; this._justInTimeAccessPolicy.internalValue = value.justInTimeAccessPolicy; } } get principalDisplayName() { return this.getStringAttribute('principal_display_name'); } set principalDisplayName(value) { this._principalDisplayName = value; } resetPrincipalDisplayName() { this._principalDisplayName = undefined; } // Temporarily expose input value. Use with caution. get principalDisplayNameInput() { return this._principalDisplayName; } get principalId() { return this.getStringAttribute('principal_id'); } set principalId(value) { this._principalId = value; } // Temporarily expose input value. Use with caution. get principalIdInput() { return this._principalId; } get roleDefinitionId() { return this.getStringAttribute('role_definition_id'); } set roleDefinitionId(value) { this._roleDefinitionId = value; } // Temporarily expose input value. Use with caution. get roleDefinitionIdInput() { return this._roleDefinitionId; } get justInTimeAccessPolicy() { return this._justInTimeAccessPolicy; } putJustInTimeAccessPolicy(value) { this._justInTimeAccessPolicy.internalValue = value; } resetJustInTimeAccessPolicy() { this._justInTimeAccessPolicy.internalValue = undefined; } // Temporarily expose input value. Use with caution. get justInTimeAccessPolicyInput() { return this._justInTimeAccessPolicy.internalValue; } } exports.LighthouseDefinitionEligibleAuthorizationOutputReference = LighthouseDefinitionEligibleAuthorizationOutputReference; _f = JSII_RTTI_SYMBOL_1; LighthouseDefinitionEligibleAuthorizationOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionEligibleAuthorizationOutputReference", version: "12.27.0" }; class LighthouseDefinitionEligibleAuthorizationList 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 LighthouseDefinitionEligibleAuthorizationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LighthouseDefinitionEligibleAuthorizationList = LighthouseDefinitionEligibleAuthorizationList; _g = JSII_RTTI_SYMBOL_1; LighthouseDefinitionEligibleAuthorizationList[_g] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionEligibleAuthorizationList", version: "12.27.0" }; function lighthouseDefinitionPlanToTerraform(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 { name: cdktf.stringToTerraform(struct.name), product: cdktf.stringToTerraform(struct.product), publisher: cdktf.stringToTerraform(struct.publisher), version: cdktf.stringToTerraform(struct.version), }; } exports.lighthouseDefinitionPlanToTerraform = lighthouseDefinitionPlanToTerraform; function lighthouseDefinitionPlanToHclTerraform(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 = { name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, product: { value: cdktf.stringToHclTerraform(struct.product), isBlock: false, type: "simple", storageClassType: "string", }, publisher: { value: cdktf.stringToHclTerraform(struct.publisher), 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)); } exports.lighthouseDefinitionPlanToHclTerraform = lighthouseDefinitionPlanToHclTerraform; class LighthouseDefinitionPlanOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._product !== undefined) { hasAnyValues = true; internalValueResult.product = this._product; } if (this._publisher !== undefined) { hasAnyValues = true; internalValueResult.publisher = this._publisher; } if (this._version !== undefined) { hasAnyValues = true; internalValueResult.version = this._version; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._name = undefined; this._product = undefined; this._publisher = undefined; this._version = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._name = value.name; this._product = value.product; this._publisher = value.publisher; this._version = value.version; } } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get product() { return this.getStringAttribute('product'); } set product(value) { this._product = value; } // Temporarily expose input value. Use with caution. get productInput() { return this._product; } get publisher() { return this.getStringAttribute('publisher'); } set publisher(value) { this._publisher = value; } // Temporarily expose input value. Use with caution. get publisherInput() { return this._publisher; } get version() { return this.getStringAttribute('version'); } set version(value) { this._version = value; } // Temporarily expose input value. Use with caution. get versionInput() { return this._version; } } exports.LighthouseDefinitionPlanOutputReference = LighthouseDefinitionPlanOutputReference; _h = JSII_RTTI_SYMBOL_1; LighthouseDefinitionPlanOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionPlanOutputReference", version: "12.27.0" }; function lighthouseDefinitionTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), read: cdktf.stringToTerraform(struct.read), update: cdktf.stringToTerraform(struct.update), }; } exports.lighthouseDefinitionTimeoutsToTerraform = lighthouseDefinitionTimeoutsToTerraform; function lighthouseDefinitionTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, read: { value: cdktf.stringToHclTerraform(struct.read), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lighthouseDefinitionTimeoutsToHclTerraform = lighthouseDefinitionTimeoutsToHclTerraform; class LighthouseDefinitionTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._read !== undefined) { hasAnyValues = true; internalValueResult.read = this._read; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._read = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._read = value.read; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get read() { return this.getStringAttribute('read'); } set read(value) { this._read = value; } resetRead() { this._read = undefined; } // Temporarily expose input value. Use with caution. get readInput() { return this._read; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.LighthouseDefinitionTimeoutsOutputReference = LighthouseDefinitionTimeoutsOutputReference; _j = JSII_RTTI_SYMBOL_1; LighthouseDefinitionTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.lighthouseDefinition.LighthouseDefinitionTimeoutsOutputReference", version: "12.27.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/lighthouse_definition azurerm_lighthouse_definition} */ class LighthouseDefinition extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a LighthouseDefinition 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 LighthouseDefinition to import * @param importFromId The id of the existing LighthouseDefinition that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/lighthouse_definition#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the LighthouseDefinition to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_lighthouse_definition", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/lighthouse_definition azurerm_lighthouse_definition} 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 LighthouseDefinitionConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'azurerm_lighthouse_definition', terraformGeneratorMetadata: { providerName: 'azurerm', providerVersion: '3.116.0', providerVersionConstraint: '~> 3.10' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // authorization - computed: false, optional: false, required: true this._authorization = new LighthouseDefinitionAuthorizationList(this, "authorization", true); // eligible_authorization - computed: false, optional: true, required: false this._eligibleAuthorization = new LighthouseDefinitionEligibleAuthorizationList(this, "eligible_authorization", true); // plan - computed: false, optional: true, required: false this._plan = new LighthouseDefinitionPlanOutputReference(this, "plan"); // timeouts - computed: false, optional: true, required: false this._timeouts = new LighthouseDefinitionTimeoutsOutputReference(this, "timeouts"); this._description = config.description; this._id = config.id; this._lighthouseDefinitionId = config.lighthouseDefinitionId; this._managingTenantId = config.managingTenantId; this._name = config.name; this._scope = config.scope; this._authorization.internalValue = config.authorization; this._eligibleAuthorization.internalValue = config.eligibleAuthorization; this._plan.internalValue = config.plan; this._timeouts.internalValue = config.timeouts; } get description() { return this.getStringAttribute('description'); } set description(value) { this._description = value; } resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. get descriptionInput() { return this._description; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get lighthouseDefinitionId() { return this.getStringAttribute('lighthouse_definition_id'); } set lighthouseDefinitionId(value) { this._lighthouseDefinitionId = value; } resetLighthouseDefinitionId() { this._lighthouseDefinitionId = undefined; } // Temporarily expose input value. Use with caution. get lighthouseDefinitionIdInput() { return this._lighthouseDefinitionId; } get managingTenantId() { return this.getStringAttribute('managing_tenant_id'); } set managingTenantId(value) { this._managingTenantId = value; } // Temporarily expose input value. Use with caution. get managingTenantIdInput() { return this._managingTenantId; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get scope() { return this.getStringAttribute('scope'); } set scope(value) { this._scope = value; } // Temporarily expose input value. Use with caution. get scopeInput() { return this._scope; } get authorization() { return this._authorization; } putAuthorization(value) { this._authorization.internalValue = value; } // Temporarily expose input value. Use with caution. get authorizationInput() { return this._authorization.internalValue; } get eligibleAuthorization() { return this._eligibleAuthorization; } putEligibleAuthorization(value) { this._eligibleAuthorization.internalValue = value; } resetEligibleAuthorization() { this._eligibleAuthorization.internalValue = undefined; } // Temporarily expose input value. Use with caution. get eligibleAuthorizationInput() { return this._eligibleAuthorization.internalValue; } get plan() { return this._plan; } putPlan(value) { this._plan.internalValue = value; } resetPlan() { this._plan.internalValue = undefined; } // Temporarily expose input value. Use with caution. get planInput() { return this._plan.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { description: cdktf.stringToTerraform(this._description), id: cdktf.stringToTerraform(this._id), lighthouse_definition_id: cdktf.stringToTerraform(this._lighthouseDefinitionId), managing_tenant_id: cdktf.stringToTerraform(this._managingTenantId), name: cdktf.stringToTerraform(this._name), scope: cdktf.stringToTerraform(this._scope), authorization: cdktf.listMapper(lighthouseDefinitionAuthorizationToTerraform, true)(this._authorization.internalValue), eligible_authorization: cdktf.listMapper(lighthouseDefinitionEligibleAuthorizationToTerraform, true)(this._eligibleAuthorization.internalValue), plan: lighthouseDefinitionPlanToTerraform(this._plan.internalValue), timeouts: lighthouseDefinitionTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { description: { value: cdktf.stringToHclTerraform(this._description), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, lighthouse_definition_id: { value: cdktf.stringToHclTerraform(this._lighthouseDefinitionId), isBlock: false, type: "simple", storageClassType: "string", }, managing_tenant_id: { value: cdktf.stringToHclTerraform(this._managingTenantId), isBlock: false, type: "simple", sto