UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,308 lines 177 kB
"use strict"; var _a, _b, _c, _d, _e, _f; Object.defineProperty(exports, "__esModule", { value: true }); exports.Lb = exports.LbTimeoutsOutputReference = exports.lbTimeoutsToHclTerraform = exports.lbTimeoutsToTerraform = exports.LbSubnetMappingList = exports.LbSubnetMappingOutputReference = exports.lbSubnetMappingToHclTerraform = exports.lbSubnetMappingToTerraform = exports.LbConnectionLogsOutputReference = exports.lbConnectionLogsToHclTerraform = exports.lbConnectionLogsToTerraform = exports.LbAccessLogsOutputReference = exports.lbAccessLogsToHclTerraform = exports.lbAccessLogsToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function lbAccessLogsToTerraform(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 { bucket: cdktf.stringToTerraform(struct.bucket), enabled: cdktf.booleanToTerraform(struct.enabled), prefix: cdktf.stringToTerraform(struct.prefix), }; } exports.lbAccessLogsToTerraform = lbAccessLogsToTerraform; function lbAccessLogsToHclTerraform(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 = { bucket: { value: cdktf.stringToHclTerraform(struct.bucket), isBlock: false, type: "simple", storageClassType: "string", }, enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, prefix: { value: cdktf.stringToHclTerraform(struct.prefix), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lbAccessLogsToHclTerraform = lbAccessLogsToHclTerraform; class LbAccessLogsOutputReference 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._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._prefix !== undefined) { hasAnyValues = true; internalValueResult.prefix = this._prefix; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; this._enabled = undefined; this._prefix = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; this._enabled = value.enabled; this._prefix = value.prefix; } } get bucket() { return this.getStringAttribute('bucket'); } set bucket(value) { this._bucket = value; } // Temporarily expose input value. Use with caution. get bucketInput() { return this._bucket; } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } get prefix() { return this.getStringAttribute('prefix'); } set prefix(value) { this._prefix = value; } resetPrefix() { this._prefix = undefined; } // Temporarily expose input value. Use with caution. get prefixInput() { return this._prefix; } } exports.LbAccessLogsOutputReference = LbAccessLogsOutputReference; _a = JSII_RTTI_SYMBOL_1; LbAccessLogsOutputReference[_a] = { fqn: "@cdktf/provider-aws.lb.LbAccessLogsOutputReference", version: "19.50.0" }; function lbConnectionLogsToTerraform(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 { bucket: cdktf.stringToTerraform(struct.bucket), enabled: cdktf.booleanToTerraform(struct.enabled), prefix: cdktf.stringToTerraform(struct.prefix), }; } exports.lbConnectionLogsToTerraform = lbConnectionLogsToTerraform; function lbConnectionLogsToHclTerraform(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 = { bucket: { value: cdktf.stringToHclTerraform(struct.bucket), isBlock: false, type: "simple", storageClassType: "string", }, enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, prefix: { value: cdktf.stringToHclTerraform(struct.prefix), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lbConnectionLogsToHclTerraform = lbConnectionLogsToHclTerraform; class LbConnectionLogsOutputReference 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._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._prefix !== undefined) { hasAnyValues = true; internalValueResult.prefix = this._prefix; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; this._enabled = undefined; this._prefix = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; this._enabled = value.enabled; this._prefix = value.prefix; } } get bucket() { return this.getStringAttribute('bucket'); } set bucket(value) { this._bucket = value; } // Temporarily expose input value. Use with caution. get bucketInput() { return this._bucket; } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } get prefix() { return this.getStringAttribute('prefix'); } set prefix(value) { this._prefix = value; } resetPrefix() { this._prefix = undefined; } // Temporarily expose input value. Use with caution. get prefixInput() { return this._prefix; } } exports.LbConnectionLogsOutputReference = LbConnectionLogsOutputReference; _b = JSII_RTTI_SYMBOL_1; LbConnectionLogsOutputReference[_b] = { fqn: "@cdktf/provider-aws.lb.LbConnectionLogsOutputReference", version: "19.50.0" }; function lbSubnetMappingToTerraform(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 { allocation_id: cdktf.stringToTerraform(struct.allocationId), ipv6_address: cdktf.stringToTerraform(struct.ipv6Address), private_ipv4_address: cdktf.stringToTerraform(struct.privateIpv4Address), subnet_id: cdktf.stringToTerraform(struct.subnetId), }; } exports.lbSubnetMappingToTerraform = lbSubnetMappingToTerraform; function lbSubnetMappingToHclTerraform(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 = { allocation_id: { value: cdktf.stringToHclTerraform(struct.allocationId), isBlock: false, type: "simple", storageClassType: "string", }, ipv6_address: { value: cdktf.stringToHclTerraform(struct.ipv6Address), isBlock: false, type: "simple", storageClassType: "string", }, private_ipv4_address: { value: cdktf.stringToHclTerraform(struct.privateIpv4Address), isBlock: false, type: "simple", storageClassType: "string", }, subnet_id: { value: cdktf.stringToHclTerraform(struct.subnetId), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.lbSubnetMappingToHclTerraform = lbSubnetMappingToHclTerraform; class LbSubnetMappingOutputReference 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._allocationId !== undefined) { hasAnyValues = true; internalValueResult.allocationId = this._allocationId; } if (this._ipv6Address !== undefined) { hasAnyValues = true; internalValueResult.ipv6Address = this._ipv6Address; } if (this._privateIpv4Address !== undefined) { hasAnyValues = true; internalValueResult.privateIpv4Address = this._privateIpv4Address; } if (this._subnetId !== undefined) { hasAnyValues = true; internalValueResult.subnetId = this._subnetId; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._allocationId = undefined; this._ipv6Address = undefined; this._privateIpv4Address = undefined; this._subnetId = 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._allocationId = value.allocationId; this._ipv6Address = value.ipv6Address; this._privateIpv4Address = value.privateIpv4Address; this._subnetId = value.subnetId; } } get allocationId() { return this.getStringAttribute('allocation_id'); } set allocationId(value) { this._allocationId = value; } resetAllocationId() { this._allocationId = undefined; } // Temporarily expose input value. Use with caution. get allocationIdInput() { return this._allocationId; } get ipv6Address() { return this.getStringAttribute('ipv6_address'); } set ipv6Address(value) { this._ipv6Address = value; } resetIpv6Address() { this._ipv6Address = undefined; } // Temporarily expose input value. Use with caution. get ipv6AddressInput() { return this._ipv6Address; } // outpost_id - computed: true, optional: false, required: false get outpostId() { return this.getStringAttribute('outpost_id'); } get privateIpv4Address() { return this.getStringAttribute('private_ipv4_address'); } set privateIpv4Address(value) { this._privateIpv4Address = value; } resetPrivateIpv4Address() { this._privateIpv4Address = undefined; } // Temporarily expose input value. Use with caution. get privateIpv4AddressInput() { return this._privateIpv4Address; } get subnetId() { return this.getStringAttribute('subnet_id'); } set subnetId(value) { this._subnetId = value; } // Temporarily expose input value. Use with caution. get subnetIdInput() { return this._subnetId; } } exports.LbSubnetMappingOutputReference = LbSubnetMappingOutputReference; _c = JSII_RTTI_SYMBOL_1; LbSubnetMappingOutputReference[_c] = { fqn: "@cdktf/provider-aws.lb.LbSubnetMappingOutputReference", version: "19.50.0" }; class LbSubnetMappingList 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 LbSubnetMappingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LbSubnetMappingList = LbSubnetMappingList; _d = JSII_RTTI_SYMBOL_1; LbSubnetMappingList[_d] = { fqn: "@cdktf/provider-aws.lb.LbSubnetMappingList", version: "19.50.0" }; function lbTimeoutsToTerraform(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), update: cdktf.stringToTerraform(struct.update), }; } exports.lbTimeoutsToTerraform = lbTimeoutsToTerraform; function lbTimeoutsToHclTerraform(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", }, 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.lbTimeoutsToHclTerraform = lbTimeoutsToHclTerraform; class LbTimeoutsOutputReference 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._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._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._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 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.LbTimeoutsOutputReference = LbTimeoutsOutputReference; _e = JSII_RTTI_SYMBOL_1; LbTimeoutsOutputReference[_e] = { fqn: "@cdktf/provider-aws.lb.LbTimeoutsOutputReference", version: "19.50.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb aws_lb} */ class Lb extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a Lb 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 Lb to import * @param importFromId The id of the existing Lb that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the Lb to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_lb", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lb aws_lb} 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 LbConfig = {} */ constructor(scope, id, config = {}) { super(scope, id, { terraformResourceType: 'aws_lb', terraformGeneratorMetadata: { providerName: 'aws', providerVersion: '5.84.0', providerVersionConstraint: '~> 5.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // access_logs - computed: false, optional: true, required: false this._accessLogs = new LbAccessLogsOutputReference(this, "access_logs"); // connection_logs - computed: false, optional: true, required: false this._connectionLogs = new LbConnectionLogsOutputReference(this, "connection_logs"); // subnet_mapping - computed: false, optional: true, required: false this._subnetMapping = new LbSubnetMappingList(this, "subnet_mapping", true); // timeouts - computed: false, optional: true, required: false this._timeouts = new LbTimeoutsOutputReference(this, "timeouts"); this._clientKeepAlive = config.clientKeepAlive; this._customerOwnedIpv4Pool = config.customerOwnedIpv4Pool; this._desyncMitigationMode = config.desyncMitigationMode; this._dnsRecordClientRoutingPolicy = config.dnsRecordClientRoutingPolicy; this._dropInvalidHeaderFields = config.dropInvalidHeaderFields; this._enableCrossZoneLoadBalancing = config.enableCrossZoneLoadBalancing; this._enableDeletionProtection = config.enableDeletionProtection; this._enableHttp2 = config.enableHttp2; this._enableTlsVersionAndCipherSuiteHeaders = config.enableTlsVersionAndCipherSuiteHeaders; this._enableWafFailOpen = config.enableWafFailOpen; this._enableXffClientPort = config.enableXffClientPort; this._enableZonalShift = config.enableZonalShift; this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = config.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic; this._id = config.id; this._idleTimeout = config.idleTimeout; this._internal = config.internal; this._ipAddressType = config.ipAddressType; this._loadBalancerType = config.loadBalancerType; this._name = config.name; this._namePrefix = config.namePrefix; this._preserveHostHeader = config.preserveHostHeader; this._securityGroups = config.securityGroups; this._subnets = config.subnets; this._tags = config.tags; this._tagsAll = config.tagsAll; this._xffHeaderProcessingMode = config.xffHeaderProcessingMode; this._accessLogs.internalValue = config.accessLogs; this._connectionLogs.internalValue = config.connectionLogs; this._subnetMapping.internalValue = config.subnetMapping; this._timeouts.internalValue = config.timeouts; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } // arn_suffix - computed: true, optional: false, required: false get arnSuffix() { return this.getStringAttribute('arn_suffix'); } get clientKeepAlive() { return this.getNumberAttribute('client_keep_alive'); } set clientKeepAlive(value) { this._clientKeepAlive = value; } resetClientKeepAlive() { this._clientKeepAlive = undefined; } // Temporarily expose input value. Use with caution. get clientKeepAliveInput() { return this._clientKeepAlive; } get customerOwnedIpv4Pool() { return this.getStringAttribute('customer_owned_ipv4_pool'); } set customerOwnedIpv4Pool(value) { this._customerOwnedIpv4Pool = value; } resetCustomerOwnedIpv4Pool() { this._customerOwnedIpv4Pool = undefined; } // Temporarily expose input value. Use with caution. get customerOwnedIpv4PoolInput() { return this._customerOwnedIpv4Pool; } get desyncMitigationMode() { return this.getStringAttribute('desync_mitigation_mode'); } set desyncMitigationMode(value) { this._desyncMitigationMode = value; } resetDesyncMitigationMode() { this._desyncMitigationMode = undefined; } // Temporarily expose input value. Use with caution. get desyncMitigationModeInput() { return this._desyncMitigationMode; } // dns_name - computed: true, optional: false, required: false get dnsName() { return this.getStringAttribute('dns_name'); } get dnsRecordClientRoutingPolicy() { return this.getStringAttribute('dns_record_client_routing_policy'); } set dnsRecordClientRoutingPolicy(value) { this._dnsRecordClientRoutingPolicy = value; } resetDnsRecordClientRoutingPolicy() { this._dnsRecordClientRoutingPolicy = undefined; } // Temporarily expose input value. Use with caution. get dnsRecordClientRoutingPolicyInput() { return this._dnsRecordClientRoutingPolicy; } get dropInvalidHeaderFields() { return this.getBooleanAttribute('drop_invalid_header_fields'); } set dropInvalidHeaderFields(value) { this._dropInvalidHeaderFields = value; } resetDropInvalidHeaderFields() { this._dropInvalidHeaderFields = undefined; } // Temporarily expose input value. Use with caution. get dropInvalidHeaderFieldsInput() { return this._dropInvalidHeaderFields; } get enableCrossZoneLoadBalancing() { return this.getBooleanAttribute('enable_cross_zone_load_balancing'); } set enableCrossZoneLoadBalancing(value) { this._enableCrossZoneLoadBalancing = value; } resetEnableCrossZoneLoadBalancing() { this._enableCrossZoneLoadBalancing = undefined; } // Temporarily expose input value. Use with caution. get enableCrossZoneLoadBalancingInput() { return this._enableCrossZoneLoadBalancing; } get enableDeletionProtection() { return this.getBooleanAttribute('enable_deletion_protection'); } set enableDeletionProtection(value) { this._enableDeletionProtection = value; } resetEnableDeletionProtection() { this._enableDeletionProtection = undefined; } // Temporarily expose input value. Use with caution. get enableDeletionProtectionInput() { return this._enableDeletionProtection; } get enableHttp2() { return this.getBooleanAttribute('enable_http2'); } set enableHttp2(value) { this._enableHttp2 = value; } resetEnableHttp2() { this._enableHttp2 = undefined; } // Temporarily expose input value. Use with caution. get enableHttp2Input() { return this._enableHttp2; } get enableTlsVersionAndCipherSuiteHeaders() { return this.getBooleanAttribute('enable_tls_version_and_cipher_suite_headers'); } set enableTlsVersionAndCipherSuiteHeaders(value) { this._enableTlsVersionAndCipherSuiteHeaders = value; } resetEnableTlsVersionAndCipherSuiteHeaders() { this._enableTlsVersionAndCipherSuiteHeaders = undefined; } // Temporarily expose input value. Use with caution. get enableTlsVersionAndCipherSuiteHeadersInput() { return this._enableTlsVersionAndCipherSuiteHeaders; } get enableWafFailOpen() { return this.getBooleanAttribute('enable_waf_fail_open'); } set enableWafFailOpen(value) { this._enableWafFailOpen = value; } resetEnableWafFailOpen() { this._enableWafFailOpen = undefined; } // Temporarily expose input value. Use with caution. get enableWafFailOpenInput() { return this._enableWafFailOpen; } get enableXffClientPort() { return this.getBooleanAttribute('enable_xff_client_port'); } set enableXffClientPort(value) { this._enableXffClientPort = value; } resetEnableXffClientPort() { this._enableXffClientPort = undefined; } // Temporarily expose input value. Use with caution. get enableXffClientPortInput() { return this._enableXffClientPort; } get enableZonalShift() { return this.getBooleanAttribute('enable_zonal_shift'); } set enableZonalShift(value) { this._enableZonalShift = value; } resetEnableZonalShift() { this._enableZonalShift = undefined; } // Temporarily expose input value. Use with caution. get enableZonalShiftInput() { return this._enableZonalShift; } get enforceSecurityGroupInboundRulesOnPrivateLinkTraffic() { return this.getStringAttribute('enforce_security_group_inbound_rules_on_private_link_traffic'); } set enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(value) { this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = value; } resetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() { this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = undefined; } // Temporarily expose input value. Use with caution. get enforceSecurityGroupInboundRulesOnPrivateLinkTrafficInput() { return this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic; } 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 idleTimeout() { return this.getNumberAttribute('idle_timeout'); } set idleTimeout(value) { this._idleTimeout = value; } resetIdleTimeout() { this._idleTimeout = undefined; } // Temporarily expose input value. Use with caution. get idleTimeoutInput() { return this._idleTimeout; } get internal() { return this.getBooleanAttribute('internal'); } set internal(value) { this._internal = value; } resetInternal() { this._internal = undefined; } // Temporarily expose input value. Use with caution. get internalInput() { return this._internal; } get ipAddressType() { return this.getStringAttribute('ip_address_type'); } set ipAddressType(value) { this._ipAddressType = value; } resetIpAddressType() { this._ipAddressType = undefined; } // Temporarily expose input value. Use with caution. get ipAddressTypeInput() { return this._ipAddressType; } get loadBalancerType() { return this.getStringAttribute('load_balancer_type'); } set loadBalancerType(value) { this._loadBalancerType = value; } resetLoadBalancerType() { this._loadBalancerType = undefined; } // Temporarily expose input value. Use with caution. get loadBalancerTypeInput() { return this._loadBalancerType; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get namePrefix() { return this.getStringAttribute('name_prefix'); } set namePrefix(value) { this._namePrefix = value; } resetNamePrefix() { this._namePrefix = undefined; } // Temporarily expose input value. Use with caution. get namePrefixInput() { return this._namePrefix; } get preserveHostHeader() { return this.getBooleanAttribute('preserve_host_header'); } set preserveHostHeader(value) { this._preserveHostHeader = value; } resetPreserveHostHeader() { this._preserveHostHeader = undefined; } // Temporarily expose input value. Use with caution. get preserveHostHeaderInput() { return this._preserveHostHeader; } get securityGroups() { return cdktf.Fn.tolist(this.getListAttribute('security_groups')); } set securityGroups(value) { this._securityGroups = value; } resetSecurityGroups() { this._securityGroups = undefined; } // Temporarily expose input value. Use with caution. get securityGroupsInput() { return this._securityGroups; } get subnets() { return cdktf.Fn.tolist(this.getListAttribute('subnets')); } set subnets(value) { this._subnets = value; } resetSubnets() { this._subnets = undefined; } // Temporarily expose input value. Use with caution. get subnetsInput() { return this._subnets; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this.getStringMapAttribute('tags_all'); } set tagsAll(value) { this._tagsAll = value; } resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. get tagsAllInput() { return this._tagsAll; } // vpc_id - computed: true, optional: false, required: false get vpcId() { return this.getStringAttribute('vpc_id'); } get xffHeaderProcessingMode() { return this.getStringAttribute('xff_header_processing_mode'); } set xffHeaderProcessingMode(value) { this._xffHeaderProcessingMode = value; } resetXffHeaderProcessingMode() { this._xffHeaderProcessingMode = undefined; } // Temporarily expose input value. Use with caution. get xffHeaderProcessingModeInput() { return this._xffHeaderProcessingMode; } // zone_id - computed: true, optional: false, required: false get zoneId() { return this.getStringAttribute('zone_id'); } get accessLogs() { return this._accessLogs; } putAccessLogs(value) { this._accessLogs.internalValue = value; } resetAccessLogs() { this._accessLogs.internalValue = undefined; } // Temporarily expose input value. Use with caution. get accessLogsInput() { return this._accessLogs.internalValue; } get connectionLogs() { return this._connectionLogs; } putConnectionLogs(value) { this._connectionLogs.internalValue = value; } resetConnectionLogs() { this._connectionLogs.internalValue = undefined; } // Temporarily expose input value. Use with caution. get connectionLogsInput() { return this._connectionLogs.internalValue; } get subnetMapping() { return this._subnetMapping; } putSubnetMapping(value) { this._subnetMapping.internalValue = value; } resetSubnetMapping() { this._subnetMapping.internalValue = undefined; } // Temporarily expose input value. Use with caution. get subnetMappingInput() { return this._subnetMapping.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 { client_keep_alive: cdktf.numberToTerraform(this._clientKeepAlive), customer_owned_ipv4_pool: cdktf.stringToTerraform(this._customerOwnedIpv4Pool), desync_mitigation_mode: cdktf.stringToTerraform(this._desyncMitigationMode), dns_record_client_routing_policy: cdktf.stringToTerraform(this._dnsRecordClientRoutingPolicy), drop_invalid_header_fields: cdktf.booleanToTerraform(this._dropInvalidHeaderFields), enable_cross_zone_load_balancing: cdktf.booleanToTerraform(this._enableCrossZoneLoadBalancing), enable_deletion_protection: cdktf.booleanToTerraform(this._enableDeletionProtection), enable_http2: cdktf.booleanToTerraform(this._enableHttp2), enable_tls_version_and_cipher_suite_headers: cdktf.booleanToTerraform(this._enableTlsVersionAndCipherSuiteHeaders), enable_waf_fail_open: cdktf.booleanToTerraform(this._enableWafFailOpen), enable_xff_client_port: cdktf.booleanToTerraform(this._enableXffClientPort), enable_zonal_shift: cdktf.booleanToTerraform(this._enableZonalShift), enforce_security_group_inbound_rules_on_private_link_traffic: cdktf.stringToTerraform(this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic), id: cdktf.stringToTerraform(this._id), idle_timeout: cdktf.numberToTerraform(this._idleTimeout), internal: cdktf.booleanToTerraform(this._internal), ip_address_type: cdktf.stringToTerraform(this._ipAddressType), load_balancer_type: cdktf.stringToTerraform(this._loadBalancerType), name: cdktf.stringToTerraform(this._name), name_prefix: cdktf.stringToTerraform(this._namePrefix), preserve_host_header: cdktf.booleanToTerraform(this._preserveHostHeader), security_groups: cdktf.listMapper(cdktf.stringToTerraform, false)(this._securityGroups), subnets: cdktf.listMapper(cdktf.stringToTerraform, false)(this._subnets), tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll), xff_header_processing_mode: cdktf.stringToTerraform(this._xffHeaderProcessingMode), access_logs: lbAccessLogsToTerraform(this._accessLogs.internalValue), connection_logs: lbConnectionLogsToTerraform(this._connectionLogs.internalValue), subnet_mapping: cdktf.listMapper(lbSubnetMappingToTerraform, true)(this._subnetMapping.internalValue), timeouts: lbTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { client_keep_alive: { value: cdktf.numberToHclTerraform(this._clientKeepAlive), isBlock: false, type: "simple", storageClassType: "number", }, customer_owned_ipv4_pool: { value: cdktf.stringToHclTerraform(this._customerOwnedIpv4Pool), isBlock: false, type: "simple", storageClassType: "string", }, desync_mitigation_mode: { value: cdktf.stringToHclTerraform(this._desyncMitigationMode), isBlock: false, type: "simple", storageClassType: "string", }, dns_record_client_routing_policy: { value: cdktf.stringToHclTerraform(this._dnsRecordClientRoutingPolicy), isBlock: false, type: "simple", storageClassType: "string", }, drop_invalid_header_fields: { value: cdktf.booleanToHclTerraform(this._dropInvalidHeaderFields), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_cross_zone_load_balancing: { value: cdktf.booleanToHclTerraform(this._enableCrossZoneLoadBalancing), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_deletion_protection: { value: cdktf.booleanToHclTerraform(this._enableDeletionProtection), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_http2: { value: cdktf.booleanToHclTerraform(this._enableHttp2), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_tls_version_and_cipher_suite_headers: { value: cdktf.booleanToHclTerraform(this._enableTlsVersionAndCipherSuiteHeaders), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_waf_fail_open: { value: cdktf.booleanToHclTerraform(this._enableWafFailOpen), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_xff_client_port: { value: cdktf.booleanToHclTerraform(this._enableXffClientPort), isBlock: false, type: "simple", storageClassType: "boolean", }, enable_zonal_shift: { value: cdktf.booleanToHclTerraform(this._enableZonalShift), isBlock: false, type: "simple", storageClassType: "boolean", }, enforce_security_group_inbound_rules_on_private_link_traffic: { value: cdktf.stringToHclTerraform(this._enforceSecurityGroupInboundRulesOnPrivateLinkTraffic), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, idle_timeout: { value: cdktf.numberToHclTerraform(this._idleTimeout), isBlock: false, type: "simple", storageClassType: "number", }, internal: { value: cdktf.booleanToHclTerraform(this._internal), isBlock: false, type: "simple", storageClassType: "boolean", }, ip_address_type: { value: cdktf.stringToHclTerraform(this._ipAddressType), isBlock: false, type: "simple", storageClassType: "string", }, load_balancer_type: { value: cdktf.stringToHclTerraform(this._loadBalancerType), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, name_prefix: { value: cdktf.stringToHclTerraform(this._namePrefix), isBlock: false, type: "simple", storageClassType: "string", }, preserve_host_header: { value: cdktf.booleanToHclTerraform(this._preserveHostHeader), isBlock: false, type: "simple", storageClassType: "boolean", }, security_groups: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._securityGroups), isBlock: false, type: "set", storageClassType: "stringList", }, subnets: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._subnets), isBlock: false, type: "set", storageClassType: "stringList", }, tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags), isBlock: false, type: "map", storageClassType: "stringMap", }, tags_all: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tagsAll), isBlock: false, type: "map", storageClassType: "stringMap", }, xff_header_processing_mode: { value: cdktf.stringToHclTerraform(this._xffHeaderProcessingMode), isBlock: false, type: "simple", storageClassType: "string", }, access_logs: { value: lbAccessLogsToHclTerraform(this._accessLogs.internalValue), isBlock: true, type: "list", storageClassType: "LbAccessLogsList", }, connection_logs: { value: lbConnectionLogsToHclTerraform(this._connectionLogs.internalValue), isBlock: true, type: "list", storageClassType: "LbConnectionLogsList", }, subnet_mapping: { value: cdktf.listMapperHcl(lbSubnetMappingToHclTerraform, true)(this._subnetMapping.internalValue), isBlock: true, type: "set", storageClassType: "LbSubnetMappingList", }, timeouts: { value: lbTimeoutsToHclTerraform(this._timeouts.internalValue), isBlock: true, type: "struct", storageClassType: "LbTimeouts", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.Lb = Lb; _f = JSII_RTTI_SYMBOL_1; Lb[_f] = { fqn: "@cdktf/provider-aws.lb.Lb", version: "19.50.0" }; // ================= // STATIC PROPERTIES // ================= Lb.tfResourceType = "aws_lb"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbGIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFTQSwrQkFBK0I7QUF3Si9CLFNBQWdCLHVCQUF1QixDQUFDLE1BQW1EO0lBQ3pGLElBQUksQ0FBQyxLQUFLLENBQUMsVUFBVSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFBQyxPQUFPLE1BQU0sQ0FBQztJQUFDLENBQUM7SUFDNUYsSUFBSSxLQUFLLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQztRQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLG9IQUFvSCxDQUFDLENBQUM7SUFDeEksQ0FBQztJQUNELE9BQU87UUFDTCxNQUFNLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxNQUFNLENBQUM7UUFDL0MsT0FBTyxFQUFFLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxNQUFPLENBQUMsT0FBTyxDQUFDO1FBQ2xELE1BQU0sRUFBRSxLQUFLLENBQUMsaUJBQWlCLENBQUMsTUFBTyxDQUFDLE1BQU0sQ0FBQztLQUNoRCxDQUFBO0FBQ0gsQ0FBQztBQVZELDBEQVVDO0FBR0QsU0FBZ0IsMEJBQTBCLENBQUMsTUFBbUQ7SUFDNUYsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUMsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLFlBQVksQ0FBQyxZQUFZLENBQUMsTUFBTSxDQUF