@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,259 lines • 208 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EksNodeGroup = exports.EksNodeGroupUpdateConfigOutputReference = exports.eksNodeGroupUpdateConfigToHclTerraform = exports.eksNodeGroupUpdateConfigToTerraform = exports.EksNodeGroupTimeoutsOutputReference = exports.eksNodeGroupTimeoutsToHclTerraform = exports.eksNodeGroupTimeoutsToTerraform = exports.EksNodeGroupTaintList = exports.EksNodeGroupTaintOutputReference = exports.eksNodeGroupTaintToHclTerraform = exports.eksNodeGroupTaintToTerraform = exports.EksNodeGroupScalingConfigOutputReference = exports.eksNodeGroupScalingConfigToHclTerraform = exports.eksNodeGroupScalingConfigToTerraform = exports.EksNodeGroupRemoteAccessOutputReference = exports.eksNodeGroupRemoteAccessToHclTerraform = exports.eksNodeGroupRemoteAccessToTerraform = exports.EksNodeGroupNodeRepairConfigOutputReference = exports.eksNodeGroupNodeRepairConfigToHclTerraform = exports.eksNodeGroupNodeRepairConfigToTerraform = exports.EksNodeGroupLaunchTemplateOutputReference = exports.eksNodeGroupLaunchTemplateToHclTerraform = exports.eksNodeGroupLaunchTemplateToTerraform = exports.EksNodeGroupResourcesList = exports.EksNodeGroupResourcesOutputReference = exports.eksNodeGroupResourcesToHclTerraform = exports.eksNodeGroupResourcesToTerraform = exports.EksNodeGroupResourcesAutoscalingGroupsList = exports.EksNodeGroupResourcesAutoscalingGroupsOutputReference = exports.eksNodeGroupResourcesAutoscalingGroupsToHclTerraform = exports.eksNodeGroupResourcesAutoscalingGroupsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function eksNodeGroupResourcesAutoscalingGroupsToTerraform(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 {};
}
exports.eksNodeGroupResourcesAutoscalingGroupsToTerraform = eksNodeGroupResourcesAutoscalingGroupsToTerraform;
function eksNodeGroupResourcesAutoscalingGroupsToHclTerraform(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 = {};
return attrs;
}
exports.eksNodeGroupResourcesAutoscalingGroupsToHclTerraform = eksNodeGroupResourcesAutoscalingGroupsToHclTerraform;
class EksNodeGroupResourcesAutoscalingGroupsOutputReference 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() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
}
exports.EksNodeGroupResourcesAutoscalingGroupsOutputReference = EksNodeGroupResourcesAutoscalingGroupsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
EksNodeGroupResourcesAutoscalingGroupsOutputReference[_a] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupResourcesAutoscalingGroupsOutputReference", version: "19.50.0" };
class EksNodeGroupResourcesAutoscalingGroupsList 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 EksNodeGroupResourcesAutoscalingGroupsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EksNodeGroupResourcesAutoscalingGroupsList = EksNodeGroupResourcesAutoscalingGroupsList;
_b = JSII_RTTI_SYMBOL_1;
EksNodeGroupResourcesAutoscalingGroupsList[_b] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupResourcesAutoscalingGroupsList", version: "19.50.0" };
function eksNodeGroupResourcesToTerraform(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 {};
}
exports.eksNodeGroupResourcesToTerraform = eksNodeGroupResourcesToTerraform;
function eksNodeGroupResourcesToHclTerraform(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 = {};
return attrs;
}
exports.eksNodeGroupResourcesToHclTerraform = eksNodeGroupResourcesToHclTerraform;
class EksNodeGroupResourcesOutputReference 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;
// autoscaling_groups - computed: true, optional: false, required: false
this._autoscalingGroups = new EksNodeGroupResourcesAutoscalingGroupsList(this, "autoscaling_groups", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
get autoscalingGroups() {
return this._autoscalingGroups;
}
// remote_access_security_group_id - computed: true, optional: false, required: false
get remoteAccessSecurityGroupId() {
return this.getStringAttribute('remote_access_security_group_id');
}
}
exports.EksNodeGroupResourcesOutputReference = EksNodeGroupResourcesOutputReference;
_c = JSII_RTTI_SYMBOL_1;
EksNodeGroupResourcesOutputReference[_c] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupResourcesOutputReference", version: "19.50.0" };
class EksNodeGroupResourcesList 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 EksNodeGroupResourcesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EksNodeGroupResourcesList = EksNodeGroupResourcesList;
_d = JSII_RTTI_SYMBOL_1;
EksNodeGroupResourcesList[_d] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupResourcesList", version: "19.50.0" };
function eksNodeGroupLaunchTemplateToTerraform(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 {
id: cdktf.stringToTerraform(struct.id),
name: cdktf.stringToTerraform(struct.name),
version: cdktf.stringToTerraform(struct.version),
};
}
exports.eksNodeGroupLaunchTemplateToTerraform = eksNodeGroupLaunchTemplateToTerraform;
function eksNodeGroupLaunchTemplateToHclTerraform(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 = {
id: {
value: cdktf.stringToHclTerraform(struct.id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
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.eksNodeGroupLaunchTemplateToHclTerraform = eksNodeGroupLaunchTemplateToHclTerraform;
class EksNodeGroupLaunchTemplateOutputReference 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._id !== undefined) {
hasAnyValues = true;
internalValueResult.id = this._id;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._id = undefined;
this._name = undefined;
this._version = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._id = value.id;
this._name = value.name;
this._version = value.version;
}
}
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 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 version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
}
exports.EksNodeGroupLaunchTemplateOutputReference = EksNodeGroupLaunchTemplateOutputReference;
_e = JSII_RTTI_SYMBOL_1;
EksNodeGroupLaunchTemplateOutputReference[_e] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupLaunchTemplateOutputReference", version: "19.50.0" };
function eksNodeGroupNodeRepairConfigToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
};
}
exports.eksNodeGroupNodeRepairConfigToTerraform = eksNodeGroupNodeRepairConfigToTerraform;
function eksNodeGroupNodeRepairConfigToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eksNodeGroupNodeRepairConfigToHclTerraform = eksNodeGroupNodeRepairConfigToHclTerraform;
class EksNodeGroupNodeRepairConfigOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
}
}
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;
}
}
exports.EksNodeGroupNodeRepairConfigOutputReference = EksNodeGroupNodeRepairConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
EksNodeGroupNodeRepairConfigOutputReference[_f] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupNodeRepairConfigOutputReference", version: "19.50.0" };
function eksNodeGroupRemoteAccessToTerraform(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 {
ec2_ssh_key: cdktf.stringToTerraform(struct.ec2SshKey),
source_security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.sourceSecurityGroupIds),
};
}
exports.eksNodeGroupRemoteAccessToTerraform = eksNodeGroupRemoteAccessToTerraform;
function eksNodeGroupRemoteAccessToHclTerraform(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 = {
ec2_ssh_key: {
value: cdktf.stringToHclTerraform(struct.ec2SshKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
source_security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.sourceSecurityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eksNodeGroupRemoteAccessToHclTerraform = eksNodeGroupRemoteAccessToHclTerraform;
class EksNodeGroupRemoteAccessOutputReference 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._ec2SshKey !== undefined) {
hasAnyValues = true;
internalValueResult.ec2SshKey = this._ec2SshKey;
}
if (this._sourceSecurityGroupIds !== undefined) {
hasAnyValues = true;
internalValueResult.sourceSecurityGroupIds = this._sourceSecurityGroupIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._ec2SshKey = undefined;
this._sourceSecurityGroupIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._ec2SshKey = value.ec2SshKey;
this._sourceSecurityGroupIds = value.sourceSecurityGroupIds;
}
}
get ec2SshKey() {
return this.getStringAttribute('ec2_ssh_key');
}
set ec2SshKey(value) {
this._ec2SshKey = value;
}
resetEc2SshKey() {
this._ec2SshKey = undefined;
}
// Temporarily expose input value. Use with caution.
get ec2SshKeyInput() {
return this._ec2SshKey;
}
get sourceSecurityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('source_security_group_ids'));
}
set sourceSecurityGroupIds(value) {
this._sourceSecurityGroupIds = value;
}
resetSourceSecurityGroupIds() {
this._sourceSecurityGroupIds = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceSecurityGroupIdsInput() {
return this._sourceSecurityGroupIds;
}
}
exports.EksNodeGroupRemoteAccessOutputReference = EksNodeGroupRemoteAccessOutputReference;
_g = JSII_RTTI_SYMBOL_1;
EksNodeGroupRemoteAccessOutputReference[_g] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupRemoteAccessOutputReference", version: "19.50.0" };
function eksNodeGroupScalingConfigToTerraform(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 {
desired_size: cdktf.numberToTerraform(struct.desiredSize),
max_size: cdktf.numberToTerraform(struct.maxSize),
min_size: cdktf.numberToTerraform(struct.minSize),
};
}
exports.eksNodeGroupScalingConfigToTerraform = eksNodeGroupScalingConfigToTerraform;
function eksNodeGroupScalingConfigToHclTerraform(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 = {
desired_size: {
value: cdktf.numberToHclTerraform(struct.desiredSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
max_size: {
value: cdktf.numberToHclTerraform(struct.maxSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min_size: {
value: cdktf.numberToHclTerraform(struct.minSize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eksNodeGroupScalingConfigToHclTerraform = eksNodeGroupScalingConfigToHclTerraform;
class EksNodeGroupScalingConfigOutputReference 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._desiredSize !== undefined) {
hasAnyValues = true;
internalValueResult.desiredSize = this._desiredSize;
}
if (this._maxSize !== undefined) {
hasAnyValues = true;
internalValueResult.maxSize = this._maxSize;
}
if (this._minSize !== undefined) {
hasAnyValues = true;
internalValueResult.minSize = this._minSize;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._desiredSize = undefined;
this._maxSize = undefined;
this._minSize = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._desiredSize = value.desiredSize;
this._maxSize = value.maxSize;
this._minSize = value.minSize;
}
}
get desiredSize() {
return this.getNumberAttribute('desired_size');
}
set desiredSize(value) {
this._desiredSize = value;
}
// Temporarily expose input value. Use with caution.
get desiredSizeInput() {
return this._desiredSize;
}
get maxSize() {
return this.getNumberAttribute('max_size');
}
set maxSize(value) {
this._maxSize = value;
}
// Temporarily expose input value. Use with caution.
get maxSizeInput() {
return this._maxSize;
}
get minSize() {
return this.getNumberAttribute('min_size');
}
set minSize(value) {
this._minSize = value;
}
// Temporarily expose input value. Use with caution.
get minSizeInput() {
return this._minSize;
}
}
exports.EksNodeGroupScalingConfigOutputReference = EksNodeGroupScalingConfigOutputReference;
_h = JSII_RTTI_SYMBOL_1;
EksNodeGroupScalingConfigOutputReference[_h] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupScalingConfigOutputReference", version: "19.50.0" };
function eksNodeGroupTaintToTerraform(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 {
effect: cdktf.stringToTerraform(struct.effect),
key: cdktf.stringToTerraform(struct.key),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.eksNodeGroupTaintToTerraform = eksNodeGroupTaintToTerraform;
function eksNodeGroupTaintToHclTerraform(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 = {
effect: {
value: cdktf.stringToHclTerraform(struct.effect),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eksNodeGroupTaintToHclTerraform = eksNodeGroupTaintToHclTerraform;
class EksNodeGroupTaintOutputReference 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._effect !== undefined) {
hasAnyValues = true;
internalValueResult.effect = this._effect;
}
if (this._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._effect = undefined;
this._key = undefined;
this._value = 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._effect = value.effect;
this._key = value.key;
this._value = value.value;
}
}
get effect() {
return this.getStringAttribute('effect');
}
set effect(value) {
this._effect = value;
}
// Temporarily expose input value. Use with caution.
get effectInput() {
return this._effect;
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
resetValue() {
this._value = undefined;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.EksNodeGroupTaintOutputReference = EksNodeGroupTaintOutputReference;
_j = JSII_RTTI_SYMBOL_1;
EksNodeGroupTaintOutputReference[_j] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupTaintOutputReference", version: "19.50.0" };
class EksNodeGroupTaintList 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 EksNodeGroupTaintOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.EksNodeGroupTaintList = EksNodeGroupTaintList;
_k = JSII_RTTI_SYMBOL_1;
EksNodeGroupTaintList[_k] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupTaintList", version: "19.50.0" };
function eksNodeGroupTimeoutsToTerraform(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.eksNodeGroupTimeoutsToTerraform = eksNodeGroupTimeoutsToTerraform;
function eksNodeGroupTimeoutsToHclTerraform(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.eksNodeGroupTimeoutsToHclTerraform = eksNodeGroupTimeoutsToHclTerraform;
class EksNodeGroupTimeoutsOutputReference 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.EksNodeGroupTimeoutsOutputReference = EksNodeGroupTimeoutsOutputReference;
_l = JSII_RTTI_SYMBOL_1;
EksNodeGroupTimeoutsOutputReference[_l] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupTimeoutsOutputReference", version: "19.50.0" };
function eksNodeGroupUpdateConfigToTerraform(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 {
max_unavailable: cdktf.numberToTerraform(struct.maxUnavailable),
max_unavailable_percentage: cdktf.numberToTerraform(struct.maxUnavailablePercentage),
};
}
exports.eksNodeGroupUpdateConfigToTerraform = eksNodeGroupUpdateConfigToTerraform;
function eksNodeGroupUpdateConfigToHclTerraform(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 = {
max_unavailable: {
value: cdktf.numberToHclTerraform(struct.maxUnavailable),
isBlock: false,
type: "simple",
storageClassType: "number",
},
max_unavailable_percentage: {
value: cdktf.numberToHclTerraform(struct.maxUnavailablePercentage),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.eksNodeGroupUpdateConfigToHclTerraform = eksNodeGroupUpdateConfigToHclTerraform;
class EksNodeGroupUpdateConfigOutputReference 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._maxUnavailable !== undefined) {
hasAnyValues = true;
internalValueResult.maxUnavailable = this._maxUnavailable;
}
if (this._maxUnavailablePercentage !== undefined) {
hasAnyValues = true;
internalValueResult.maxUnavailablePercentage = this._maxUnavailablePercentage;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._maxUnavailable = undefined;
this._maxUnavailablePercentage = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._maxUnavailable = value.maxUnavailable;
this._maxUnavailablePercentage = value.maxUnavailablePercentage;
}
}
get maxUnavailable() {
return this.getNumberAttribute('max_unavailable');
}
set maxUnavailable(value) {
this._maxUnavailable = value;
}
resetMaxUnavailable() {
this._maxUnavailable = undefined;
}
// Temporarily expose input value. Use with caution.
get maxUnavailableInput() {
return this._maxUnavailable;
}
get maxUnavailablePercentage() {
return this.getNumberAttribute('max_unavailable_percentage');
}
set maxUnavailablePercentage(value) {
this._maxUnavailablePercentage = value;
}
resetMaxUnavailablePercentage() {
this._maxUnavailablePercentage = undefined;
}
// Temporarily expose input value. Use with caution.
get maxUnavailablePercentageInput() {
return this._maxUnavailablePercentage;
}
}
exports.EksNodeGroupUpdateConfigOutputReference = EksNodeGroupUpdateConfigOutputReference;
_m = JSII_RTTI_SYMBOL_1;
EksNodeGroupUpdateConfigOutputReference[_m] = { fqn: "@cdktf/provider-aws.eksNodeGroup.EksNodeGroupUpdateConfigOutputReference", version: "19.50.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/eks_node_group aws_eks_node_group}
*/
class EksNodeGroup extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a EksNodeGroup 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 EksNodeGroup to import
* @param importFromId The id of the existing EksNodeGroup that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/eks_node_group#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the EksNodeGroup to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_eks_node_group", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/eks_node_group aws_eks_node_group} 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 EksNodeGroupConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_eks_node_group',
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
});
// resources - computed: true, optional: false, required: false
this._resources = new EksNodeGroupResourcesList(this, "resources", false);
// launch_template - computed: false, optional: true, required: false
this._launchTemplate = new EksNodeGroupLaunchTemplateOutputReference(this, "launch_template");
// node_repair_config - computed: false, optional: true, required: false
this._nodeRepairConfig = new EksNodeGroupNodeRepairConfigOutputReference(this, "node_repair_config");
// remote_access - computed: false, optional: true, required: false
this._remoteAccess = new EksNodeGroupRemoteAccessOutputReference(this, "remote_access");
// scaling_config - computed: false, optional: false, required: true
this._scalingConfig = new EksNodeGroupScalingConfigOutputReference(this, "scaling_config");
// taint - computed: false, optional: true, required: false
this._taint = new EksNodeGroupTaintList(this, "taint", true);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new EksNodeGroupTimeoutsOutputReference(this, "timeouts");
// update_config - computed: false, optional: true, required: false
this._updateConfig = new EksNodeGroupUpdateConfigOutputReference(this, "update_config");
this._amiType = config.amiType;
this._capacityType = config.capacityType;
this._clusterName = config.clusterName;
this._diskSize = config.diskSize;
this._forceUpdateVersion = config.forceUpdateVersion;
this._id = config.id;
this._instanceTypes = config.instanceTypes;
this._labels = config.labels;
this._nodeGroupName = config.nodeGroupName;
this._nodeGroupNamePrefix = config.nodeGroupNamePrefix;
this._nodeRoleArn = config.nodeRoleArn;
this._releaseVersion = config.releaseVersion;
this._subnetIds = config.subnetIds;
this._tags = config.tags;
this._tagsAll = config.tagsAll;
this._version = config.version;
this._launchTemplate.internalValue = config.launchTemplate;
this._nodeRepairConfig.internalValue = config.nodeRepairConfig;
this._remoteAccess.internalValue = config.remoteAccess;
this._scalingConfig.internalValue = config.scalingConfig;
this._taint.internalValue = config.taint;
this._timeouts.internalValue = config.timeouts;
this._updateConfig.internalValue = config.updateConfig;
}
get amiType() {
return this.getStringAttribute('ami_type');
}
set amiType(value) {
this._amiType = value;
}
resetAmiType() {
this._amiType = undefined;
}
// Temporarily expose input value. Use with caution.
get amiTypeInput() {
return this._amiType;
}
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
get capacityType() {
return this.getStringAttribute('capacity_type');
}
set capacityType(value) {
this._capacityType = value;
}
resetCapacityType() {
this._capacityType = undefined;
}
// Temporarily expose input value. Use with caution.
get capacityTypeInput() {
return this._capacityType;
}
get clusterName() {
return this.getStringAttribute('cluster_name');
}
set clusterName(value) {
this._clusterName = value;
}
// Temporarily expose input value. Use with caution.
get clusterNameInput() {
return this._clusterName;
}
get diskSize() {
return this.getNumberAttribute('disk_size');
}
set diskSize(value) {
this._diskSize = value;
}
resetDiskSize() {
this._diskSize = undefined;
}
// Temporarily expose input value. Use with caution.
get diskSizeInput() {
return this._diskSize;
}
get forceUpdateVersion() {
return this.getBooleanAttribute('force_update_version');
}
set forceUpdateVersion(value) {
this._forceUpdateVersion = value;
}
resetForceUpdateVersion() {
this._forceUpdateVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get forceUpdateVersionInput() {
return this._forceUpdateVersion;
}
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 instanceTypes() {
return this.getListAttribute('instance_types');
}
set instanceTypes(value) {
this._instanceTypes = value;
}
resetInstanceTypes() {
this._instanceTypes = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceTypesInput() {
return this._instanceTypes;
}
get labels() {
return this.getStringMapAttribute('labels');
}
set labels(value) {
this._labels = value;
}
resetLabels() {
this._labels = undefined;
}
// Temporarily expose input value. Use with caution.
get labelsInput() {
return this._labels;
}
get nodeGroupName() {
return this.getStringAttribute('node_group_name');
}
set nodeGroupName(value) {
this._nodeGroupName = value;
}
resetNodeGroupName() {
this._nodeGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get nodeGroupNameInput() {
return this._nodeGroupName;
}
get nodeGroupNamePrefix() {
return this.getStringAttribute('node_group_name_prefix');
}
set nodeGroupNamePrefix(value) {
this._nodeGroupNamePrefix = value;
}
resetNodeGroupNamePrefix() {
this._nodeGroupNamePrefix = undefined;
}
// Temporarily expose input value. Use with caution.
get nodeGroupNamePrefixInput() {
return this._nodeGroupNamePrefix;
}
get nodeRoleArn() {
return this.getStringAttribute('node_role_arn');
}
set nodeRoleArn(value) {
this._nodeRoleArn = value;
}
// Temporarily expose input value. Use with caution.
get nodeRoleArnInput() {
return this._nodeRoleArn;
}
get releaseVersion() {
return this.getStringAttribute('release_version');
}
set releaseVersion(value) {
this._releaseVersion = value;
}
resetReleaseVersion() {
this._releaseVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get releaseVersionInput() {
return this._releaseVersion;
}
get resources() {
return this._resources;
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
get subnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
}
set subnetIds(value) {
this._subnetIds = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdsInput() {
return this._subnetIds;
}
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;
}
get version() {
return this.