@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,366 lines (1,365 loc) • 230 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Alb = exports.AlbTimeoutsOutputReference = exports.AlbSubnetMappingList = exports.AlbSubnetMappingOutputReference = exports.AlbMinimumLoadBalancerCapacityOutputReference = exports.AlbIpamPoolsOutputReference = exports.AlbHealthCheckLogsOutputReference = exports.AlbConnectionLogsOutputReference = exports.AlbAccessLogsOutputReference = void 0;
exports.albAccessLogsToTerraform = albAccessLogsToTerraform;
exports.albAccessLogsToHclTerraform = albAccessLogsToHclTerraform;
exports.albConnectionLogsToTerraform = albConnectionLogsToTerraform;
exports.albConnectionLogsToHclTerraform = albConnectionLogsToHclTerraform;
exports.albHealthCheckLogsToTerraform = albHealthCheckLogsToTerraform;
exports.albHealthCheckLogsToHclTerraform = albHealthCheckLogsToHclTerraform;
exports.albIpamPoolsToTerraform = albIpamPoolsToTerraform;
exports.albIpamPoolsToHclTerraform = albIpamPoolsToHclTerraform;
exports.albMinimumLoadBalancerCapacityToTerraform = albMinimumLoadBalancerCapacityToTerraform;
exports.albMinimumLoadBalancerCapacityToHclTerraform = albMinimumLoadBalancerCapacityToHclTerraform;
exports.albSubnetMappingToTerraform = albSubnetMappingToTerraform;
exports.albSubnetMappingToHclTerraform = albSubnetMappingToHclTerraform;
exports.albTimeoutsToTerraform = albTimeoutsToTerraform;
exports.albTimeoutsToHclTerraform = albTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function albAccessLogsToTerraform(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),
};
}
function albAccessLogsToHclTerraform(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));
}
class AlbAccessLogsOutputReference 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.AlbAccessLogsOutputReference = AlbAccessLogsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AlbAccessLogsOutputReference[_a] = { fqn: "@cdktf/provider-aws.alb.AlbAccessLogsOutputReference", version: "21.22.1" };
function albConnectionLogsToTerraform(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),
};
}
function albConnectionLogsToHclTerraform(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));
}
class AlbConnectionLogsOutputReference 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.AlbConnectionLogsOutputReference = AlbConnectionLogsOutputReference;
_b = JSII_RTTI_SYMBOL_1;
AlbConnectionLogsOutputReference[_b] = { fqn: "@cdktf/provider-aws.alb.AlbConnectionLogsOutputReference", version: "21.22.1" };
function albHealthCheckLogsToTerraform(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),
};
}
function albHealthCheckLogsToHclTerraform(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));
}
class AlbHealthCheckLogsOutputReference 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.AlbHealthCheckLogsOutputReference = AlbHealthCheckLogsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
AlbHealthCheckLogsOutputReference[_c] = { fqn: "@cdktf/provider-aws.alb.AlbHealthCheckLogsOutputReference", version: "21.22.1" };
function albIpamPoolsToTerraform(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 {
ipv4_ipam_pool_id: cdktf.stringToTerraform(struct.ipv4IpamPoolId),
};
}
function albIpamPoolsToHclTerraform(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 = {
ipv4_ipam_pool_id: {
value: cdktf.stringToHclTerraform(struct.ipv4IpamPoolId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlbIpamPoolsOutputReference 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._ipv4IpamPoolId !== undefined) {
hasAnyValues = true;
internalValueResult.ipv4IpamPoolId = this._ipv4IpamPoolId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._ipv4IpamPoolId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._ipv4IpamPoolId = value.ipv4IpamPoolId;
}
}
get ipv4IpamPoolId() {
return this.getStringAttribute('ipv4_ipam_pool_id');
}
set ipv4IpamPoolId(value) {
this._ipv4IpamPoolId = value;
}
// Temporarily expose input value. Use with caution.
get ipv4IpamPoolIdInput() {
return this._ipv4IpamPoolId;
}
}
exports.AlbIpamPoolsOutputReference = AlbIpamPoolsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AlbIpamPoolsOutputReference[_d] = { fqn: "@cdktf/provider-aws.alb.AlbIpamPoolsOutputReference", version: "21.22.1" };
function albMinimumLoadBalancerCapacityToTerraform(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 {
capacity_units: cdktf.numberToTerraform(struct.capacityUnits),
};
}
function albMinimumLoadBalancerCapacityToHclTerraform(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 = {
capacity_units: {
value: cdktf.numberToHclTerraform(struct.capacityUnits),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlbMinimumLoadBalancerCapacityOutputReference 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._capacityUnits !== undefined) {
hasAnyValues = true;
internalValueResult.capacityUnits = this._capacityUnits;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._capacityUnits = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._capacityUnits = value.capacityUnits;
}
}
get capacityUnits() {
return this.getNumberAttribute('capacity_units');
}
set capacityUnits(value) {
this._capacityUnits = value;
}
// Temporarily expose input value. Use with caution.
get capacityUnitsInput() {
return this._capacityUnits;
}
}
exports.AlbMinimumLoadBalancerCapacityOutputReference = AlbMinimumLoadBalancerCapacityOutputReference;
_e = JSII_RTTI_SYMBOL_1;
AlbMinimumLoadBalancerCapacityOutputReference[_e] = { fqn: "@cdktf/provider-aws.alb.AlbMinimumLoadBalancerCapacityOutputReference", version: "21.22.1" };
function albSubnetMappingToTerraform(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),
};
}
function albSubnetMappingToHclTerraform(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));
}
class AlbSubnetMappingOutputReference 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.AlbSubnetMappingOutputReference = AlbSubnetMappingOutputReference;
_f = JSII_RTTI_SYMBOL_1;
AlbSubnetMappingOutputReference[_f] = { fqn: "@cdktf/provider-aws.alb.AlbSubnetMappingOutputReference", version: "21.22.1" };
class AlbSubnetMappingList 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 AlbSubnetMappingOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AlbSubnetMappingList = AlbSubnetMappingList;
_g = JSII_RTTI_SYMBOL_1;
AlbSubnetMappingList[_g] = { fqn: "@cdktf/provider-aws.alb.AlbSubnetMappingList", version: "21.22.1" };
function albTimeoutsToTerraform(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),
};
}
function albTimeoutsToHclTerraform(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));
}
class AlbTimeoutsOutputReference 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.AlbTimeoutsOutputReference = AlbTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
AlbTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-aws.alb.AlbTimeoutsOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/alb aws_alb}
*/
class Alb extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a Alb 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 Alb to import
* @param importFromId The id of the existing Alb that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/alb#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the Alb to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_alb", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/alb aws_alb} 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 AlbConfig = {}
*/
constructor(scope, id, config = {}) {
super(scope, id, {
terraformResourceType: 'aws_alb',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '6.25.0',
providerVersionConstraint: '~> 6.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 AlbAccessLogsOutputReference(this, "access_logs");
// connection_logs - computed: false, optional: true, required: false
this._connectionLogs = new AlbConnectionLogsOutputReference(this, "connection_logs");
// health_check_logs - computed: false, optional: true, required: false
this._healthCheckLogs = new AlbHealthCheckLogsOutputReference(this, "health_check_logs");
// ipam_pools - computed: false, optional: true, required: false
this._ipamPools = new AlbIpamPoolsOutputReference(this, "ipam_pools");
// minimum_load_balancer_capacity - computed: false, optional: true, required: false
this._minimumLoadBalancerCapacity = new AlbMinimumLoadBalancerCapacityOutputReference(this, "minimum_load_balancer_capacity");
// subnet_mapping - computed: false, optional: true, required: false
this._subnetMapping = new AlbSubnetMappingList(this, "subnet_mapping", true);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new AlbTimeoutsOutputReference(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._region = config.region;
this._secondaryIpsAutoAssignedPerSubnet = config.secondaryIpsAutoAssignedPerSubnet;
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._healthCheckLogs.internalValue = config.healthCheckLogs;
this._ipamPools.internalValue = config.ipamPools;
this._minimumLoadBalancerCapacity.internalValue = config.minimumLoadBalancerCapacity;
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 region() {
return this.getStringAttribute('region');
}
set region(value) {
this._region = value;
}
resetRegion() {
this._region = undefined;
}
// Temporarily expose input value. Use with caution.
get regionInput() {
return this._region;
}
get secondaryIpsAutoAssignedPerSubnet() {
return this.getNumberAttribute('secondary_ips_auto_assigned_per_subnet');
}
set secondaryIpsAutoAssignedPerSubnet(value) {
this._secondaryIpsAutoAssignedPerSubnet = value;
}
resetSecondaryIpsAutoAssignedPerSubnet() {
this._secondaryIpsAutoAssignedPerSubnet = undefined;
}
// Temporarily expose input value. Use with caution.
get secondaryIpsAutoAssignedPerSubnetInput() {
return this._secondaryIpsAutoAssignedPerSubnet;
}
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 healthCheckLogs() {
return this._healthCheckLogs;
}
putHealthCheckLogs(value) {
this._healthCheckLogs.internalValue = value;
}
resetHealthCheckLogs() {