@cdktf/provider-kubernetes
Version:
Prebuilt kubernetes Provider for Terraform CDK (cdktf)
1,160 lines • 352 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PodSecurityPolicy = exports.PodSecurityPolicySpecOutputReference = exports.PodSecurityPolicySpecSupplementalGroupsOutputReference = exports.PodSecurityPolicySpecSupplementalGroupsRangeList = exports.PodSecurityPolicySpecSupplementalGroupsRangeOutputReference = exports.PodSecurityPolicySpecSeLinuxOutputReference = exports.PodSecurityPolicySpecSeLinuxSeLinuxOptionsList = exports.PodSecurityPolicySpecSeLinuxSeLinuxOptionsOutputReference = exports.PodSecurityPolicySpecRunAsUserOutputReference = exports.PodSecurityPolicySpecRunAsUserRangeList = exports.PodSecurityPolicySpecRunAsUserRangeOutputReference = exports.PodSecurityPolicySpecRunAsGroupOutputReference = exports.PodSecurityPolicySpecRunAsGroupRangeList = exports.PodSecurityPolicySpecRunAsGroupRangeOutputReference = exports.PodSecurityPolicySpecHostPortsList = exports.PodSecurityPolicySpecHostPortsOutputReference = exports.PodSecurityPolicySpecFsGroupOutputReference = exports.PodSecurityPolicySpecFsGroupRangeList = exports.PodSecurityPolicySpecFsGroupRangeOutputReference = exports.PodSecurityPolicySpecAllowedHostPathsList = exports.PodSecurityPolicySpecAllowedHostPathsOutputReference = exports.PodSecurityPolicySpecAllowedFlexVolumesList = exports.PodSecurityPolicySpecAllowedFlexVolumesOutputReference = exports.PodSecurityPolicyMetadataOutputReference = void 0;
exports.podSecurityPolicyMetadataToTerraform = podSecurityPolicyMetadataToTerraform;
exports.podSecurityPolicyMetadataToHclTerraform = podSecurityPolicyMetadataToHclTerraform;
exports.podSecurityPolicySpecAllowedFlexVolumesToTerraform = podSecurityPolicySpecAllowedFlexVolumesToTerraform;
exports.podSecurityPolicySpecAllowedFlexVolumesToHclTerraform = podSecurityPolicySpecAllowedFlexVolumesToHclTerraform;
exports.podSecurityPolicySpecAllowedHostPathsToTerraform = podSecurityPolicySpecAllowedHostPathsToTerraform;
exports.podSecurityPolicySpecAllowedHostPathsToHclTerraform = podSecurityPolicySpecAllowedHostPathsToHclTerraform;
exports.podSecurityPolicySpecFsGroupRangeToTerraform = podSecurityPolicySpecFsGroupRangeToTerraform;
exports.podSecurityPolicySpecFsGroupRangeToHclTerraform = podSecurityPolicySpecFsGroupRangeToHclTerraform;
exports.podSecurityPolicySpecFsGroupToTerraform = podSecurityPolicySpecFsGroupToTerraform;
exports.podSecurityPolicySpecFsGroupToHclTerraform = podSecurityPolicySpecFsGroupToHclTerraform;
exports.podSecurityPolicySpecHostPortsToTerraform = podSecurityPolicySpecHostPortsToTerraform;
exports.podSecurityPolicySpecHostPortsToHclTerraform = podSecurityPolicySpecHostPortsToHclTerraform;
exports.podSecurityPolicySpecRunAsGroupRangeToTerraform = podSecurityPolicySpecRunAsGroupRangeToTerraform;
exports.podSecurityPolicySpecRunAsGroupRangeToHclTerraform = podSecurityPolicySpecRunAsGroupRangeToHclTerraform;
exports.podSecurityPolicySpecRunAsGroupToTerraform = podSecurityPolicySpecRunAsGroupToTerraform;
exports.podSecurityPolicySpecRunAsGroupToHclTerraform = podSecurityPolicySpecRunAsGroupToHclTerraform;
exports.podSecurityPolicySpecRunAsUserRangeToTerraform = podSecurityPolicySpecRunAsUserRangeToTerraform;
exports.podSecurityPolicySpecRunAsUserRangeToHclTerraform = podSecurityPolicySpecRunAsUserRangeToHclTerraform;
exports.podSecurityPolicySpecRunAsUserToTerraform = podSecurityPolicySpecRunAsUserToTerraform;
exports.podSecurityPolicySpecRunAsUserToHclTerraform = podSecurityPolicySpecRunAsUserToHclTerraform;
exports.podSecurityPolicySpecSeLinuxSeLinuxOptionsToTerraform = podSecurityPolicySpecSeLinuxSeLinuxOptionsToTerraform;
exports.podSecurityPolicySpecSeLinuxSeLinuxOptionsToHclTerraform = podSecurityPolicySpecSeLinuxSeLinuxOptionsToHclTerraform;
exports.podSecurityPolicySpecSeLinuxToTerraform = podSecurityPolicySpecSeLinuxToTerraform;
exports.podSecurityPolicySpecSeLinuxToHclTerraform = podSecurityPolicySpecSeLinuxToHclTerraform;
exports.podSecurityPolicySpecSupplementalGroupsRangeToTerraform = podSecurityPolicySpecSupplementalGroupsRangeToTerraform;
exports.podSecurityPolicySpecSupplementalGroupsRangeToHclTerraform = podSecurityPolicySpecSupplementalGroupsRangeToHclTerraform;
exports.podSecurityPolicySpecSupplementalGroupsToTerraform = podSecurityPolicySpecSupplementalGroupsToTerraform;
exports.podSecurityPolicySpecSupplementalGroupsToHclTerraform = podSecurityPolicySpecSupplementalGroupsToHclTerraform;
exports.podSecurityPolicySpecToTerraform = podSecurityPolicySpecToTerraform;
exports.podSecurityPolicySpecToHclTerraform = podSecurityPolicySpecToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function podSecurityPolicyMetadataToTerraform(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 {
annotations: cdktf.hashMapper(cdktf.stringToTerraform)(struct.annotations),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels),
name: cdktf.stringToTerraform(struct.name),
};
}
function podSecurityPolicyMetadataToHclTerraform(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 = {
annotations: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.annotations),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
labels: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicyMetadataOutputReference 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._annotations !== undefined) {
hasAnyValues = true;
internalValueResult.annotations = this._annotations;
}
if (this._labels !== undefined) {
hasAnyValues = true;
internalValueResult.labels = this._labels;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._annotations = undefined;
this._labels = undefined;
this._name = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._annotations = value.annotations;
this._labels = value.labels;
this._name = value.name;
}
}
get annotations() {
return this.getStringMapAttribute('annotations');
}
set annotations(value) {
this._annotations = value;
}
resetAnnotations() {
this._annotations = undefined;
}
// Temporarily expose input value. Use with caution.
get annotationsInput() {
return this._annotations;
}
// generation - computed: true, optional: false, required: false
get generation() {
return this.getNumberAttribute('generation');
}
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 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;
}
// resource_version - computed: true, optional: false, required: false
get resourceVersion() {
return this.getStringAttribute('resource_version');
}
// uid - computed: true, optional: false, required: false
get uid() {
return this.getStringAttribute('uid');
}
}
exports.PodSecurityPolicyMetadataOutputReference = PodSecurityPolicyMetadataOutputReference;
_a = JSII_RTTI_SYMBOL_1;
PodSecurityPolicyMetadataOutputReference[_a] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicyMetadataOutputReference", version: "12.1.1" };
function podSecurityPolicySpecAllowedFlexVolumesToTerraform(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 {
driver: cdktf.stringToTerraform(struct.driver),
};
}
function podSecurityPolicySpecAllowedFlexVolumesToHclTerraform(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 = {
driver: {
value: cdktf.stringToHclTerraform(struct.driver),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecAllowedFlexVolumesOutputReference 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._driver !== undefined) {
hasAnyValues = true;
internalValueResult.driver = this._driver;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._driver = 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._driver = value.driver;
}
}
get driver() {
return this.getStringAttribute('driver');
}
set driver(value) {
this._driver = value;
}
// Temporarily expose input value. Use with caution.
get driverInput() {
return this._driver;
}
}
exports.PodSecurityPolicySpecAllowedFlexVolumesOutputReference = PodSecurityPolicySpecAllowedFlexVolumesOutputReference;
_b = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecAllowedFlexVolumesOutputReference[_b] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecAllowedFlexVolumesOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecAllowedFlexVolumesList 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 PodSecurityPolicySpecAllowedFlexVolumesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecAllowedFlexVolumesList = PodSecurityPolicySpecAllowedFlexVolumesList;
_c = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecAllowedFlexVolumesList[_c] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecAllowedFlexVolumesList", version: "12.1.1" };
function podSecurityPolicySpecAllowedHostPathsToTerraform(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 {
path_prefix: cdktf.stringToTerraform(struct.pathPrefix),
read_only: cdktf.booleanToTerraform(struct.readOnly),
};
}
function podSecurityPolicySpecAllowedHostPathsToHclTerraform(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 = {
path_prefix: {
value: cdktf.stringToHclTerraform(struct.pathPrefix),
isBlock: false,
type: "simple",
storageClassType: "string",
},
read_only: {
value: cdktf.booleanToHclTerraform(struct.readOnly),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecAllowedHostPathsOutputReference 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._pathPrefix !== undefined) {
hasAnyValues = true;
internalValueResult.pathPrefix = this._pathPrefix;
}
if (this._readOnly !== undefined) {
hasAnyValues = true;
internalValueResult.readOnly = this._readOnly;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._pathPrefix = undefined;
this._readOnly = 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._pathPrefix = value.pathPrefix;
this._readOnly = value.readOnly;
}
}
get pathPrefix() {
return this.getStringAttribute('path_prefix');
}
set pathPrefix(value) {
this._pathPrefix = value;
}
// Temporarily expose input value. Use with caution.
get pathPrefixInput() {
return this._pathPrefix;
}
get readOnly() {
return this.getBooleanAttribute('read_only');
}
set readOnly(value) {
this._readOnly = value;
}
resetReadOnly() {
this._readOnly = undefined;
}
// Temporarily expose input value. Use with caution.
get readOnlyInput() {
return this._readOnly;
}
}
exports.PodSecurityPolicySpecAllowedHostPathsOutputReference = PodSecurityPolicySpecAllowedHostPathsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecAllowedHostPathsOutputReference[_d] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecAllowedHostPathsOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecAllowedHostPathsList 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 PodSecurityPolicySpecAllowedHostPathsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecAllowedHostPathsList = PodSecurityPolicySpecAllowedHostPathsList;
_e = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecAllowedHostPathsList[_e] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecAllowedHostPathsList", version: "12.1.1" };
function podSecurityPolicySpecFsGroupRangeToTerraform(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: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
function podSecurityPolicySpecFsGroupRangeToHclTerraform(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: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecFsGroupRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._max = undefined;
this._min = 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._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.PodSecurityPolicySpecFsGroupRangeOutputReference = PodSecurityPolicySpecFsGroupRangeOutputReference;
_f = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecFsGroupRangeOutputReference[_f] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecFsGroupRangeOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecFsGroupRangeList 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 PodSecurityPolicySpecFsGroupRangeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecFsGroupRangeList = PodSecurityPolicySpecFsGroupRangeList;
_g = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecFsGroupRangeList[_g] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecFsGroupRangeList", version: "12.1.1" };
function podSecurityPolicySpecFsGroupToTerraform(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 {
rule: cdktf.stringToTerraform(struct.rule),
range: cdktf.listMapper(podSecurityPolicySpecFsGroupRangeToTerraform, true)(struct.range),
};
}
function podSecurityPolicySpecFsGroupToHclTerraform(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 = {
rule: {
value: cdktf.stringToHclTerraform(struct.rule),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range: {
value: cdktf.listMapperHcl(podSecurityPolicySpecFsGroupRangeToHclTerraform, true)(struct.range),
isBlock: true,
type: "list",
storageClassType: "PodSecurityPolicySpecFsGroupRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecFsGroupOutputReference 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;
// range - computed: false, optional: true, required: false
this._range = new PodSecurityPolicySpecFsGroupRangeList(this, "range", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._rule !== undefined) {
hasAnyValues = true;
internalValueResult.rule = this._rule;
}
if (this._range?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.range = this._range?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._rule = undefined;
this._range.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._rule = value.rule;
this._range.internalValue = value.range;
}
}
get rule() {
return this.getStringAttribute('rule');
}
set rule(value) {
this._rule = value;
}
// Temporarily expose input value. Use with caution.
get ruleInput() {
return this._rule;
}
get range() {
return this._range;
}
putRange(value) {
this._range.internalValue = value;
}
resetRange() {
this._range.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get rangeInput() {
return this._range.internalValue;
}
}
exports.PodSecurityPolicySpecFsGroupOutputReference = PodSecurityPolicySpecFsGroupOutputReference;
_h = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecFsGroupOutputReference[_h] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecFsGroupOutputReference", version: "12.1.1" };
function podSecurityPolicySpecHostPortsToTerraform(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: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
function podSecurityPolicySpecHostPortsToHclTerraform(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: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecHostPortsOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._max = undefined;
this._min = 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._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.PodSecurityPolicySpecHostPortsOutputReference = PodSecurityPolicySpecHostPortsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecHostPortsOutputReference[_j] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecHostPortsOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecHostPortsList 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 PodSecurityPolicySpecHostPortsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecHostPortsList = PodSecurityPolicySpecHostPortsList;
_k = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecHostPortsList[_k] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecHostPortsList", version: "12.1.1" };
function podSecurityPolicySpecRunAsGroupRangeToTerraform(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: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
function podSecurityPolicySpecRunAsGroupRangeToHclTerraform(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: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecRunAsGroupRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._max = undefined;
this._min = 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._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.PodSecurityPolicySpecRunAsGroupRangeOutputReference = PodSecurityPolicySpecRunAsGroupRangeOutputReference;
_l = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecRunAsGroupRangeOutputReference[_l] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecRunAsGroupRangeOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecRunAsGroupRangeList 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 PodSecurityPolicySpecRunAsGroupRangeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecRunAsGroupRangeList = PodSecurityPolicySpecRunAsGroupRangeList;
_m = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecRunAsGroupRangeList[_m] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecRunAsGroupRangeList", version: "12.1.1" };
function podSecurityPolicySpecRunAsGroupToTerraform(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 {
rule: cdktf.stringToTerraform(struct.rule),
range: cdktf.listMapper(podSecurityPolicySpecRunAsGroupRangeToTerraform, true)(struct.range),
};
}
function podSecurityPolicySpecRunAsGroupToHclTerraform(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 = {
rule: {
value: cdktf.stringToHclTerraform(struct.rule),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range: {
value: cdktf.listMapperHcl(podSecurityPolicySpecRunAsGroupRangeToHclTerraform, true)(struct.range),
isBlock: true,
type: "list",
storageClassType: "PodSecurityPolicySpecRunAsGroupRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecRunAsGroupOutputReference 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;
// range - computed: false, optional: true, required: false
this._range = new PodSecurityPolicySpecRunAsGroupRangeList(this, "range", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._rule !== undefined) {
hasAnyValues = true;
internalValueResult.rule = this._rule;
}
if (this._range?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.range = this._range?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._rule = undefined;
this._range.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._rule = value.rule;
this._range.internalValue = value.range;
}
}
get rule() {
return this.getStringAttribute('rule');
}
set rule(value) {
this._rule = value;
}
// Temporarily expose input value. Use with caution.
get ruleInput() {
return this._rule;
}
get range() {
return this._range;
}
putRange(value) {
this._range.internalValue = value;
}
resetRange() {
this._range.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get rangeInput() {
return this._range.internalValue;
}
}
exports.PodSecurityPolicySpecRunAsGroupOutputReference = PodSecurityPolicySpecRunAsGroupOutputReference;
_o = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecRunAsGroupOutputReference[_o] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecRunAsGroupOutputReference", version: "12.1.1" };
function podSecurityPolicySpecRunAsUserRangeToTerraform(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: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
function podSecurityPolicySpecRunAsUserRangeToHclTerraform(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: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecRunAsUserRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._max = undefined;
this._min = 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._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.PodSecurityPolicySpecRunAsUserRangeOutputReference = PodSecurityPolicySpecRunAsUserRangeOutputReference;
_p = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecRunAsUserRangeOutputReference[_p] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecRunAsUserRangeOutputReference", version: "12.1.1" };
class PodSecurityPolicySpecRunAsUserRangeList 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 PodSecurityPolicySpecRunAsUserRangeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.PodSecurityPolicySpecRunAsUserRangeList = PodSecurityPolicySpecRunAsUserRangeList;
_q = JSII_RTTI_SYMBOL_1;
PodSecurityPolicySpecRunAsUserRangeList[_q] = { fqn: "@cdktf/provider-kubernetes.podSecurityPolicy.PodSecurityPolicySpecRunAsUserRangeList", version: "12.1.1" };
function podSecurityPolicySpecRunAsUserToTerraform(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 {
rule: cdktf.stringToTerraform(struct.rule),
range: cdktf.listMapper(podSecurityPolicySpecRunAsUserRangeToTerraform, true)(struct.range),
};
}
function podSecurityPolicySpecRunAsUserToHclTerraform(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 = {
rule: {
value: cdktf.stringToHclTerraform(struct.rule),
isBlock: false,
type: "simple",
storageClassType: "string",
},
range: {
value: cdktf.listMapperHcl(podSecurityPolicySpecRunAsUserRangeToHclTerraform, true)(struct.range),
isBlock: true,
type: "list",
storageClassType: "PodSecurityPolicySpecRunAsUserRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class PodSecurityPolicySpecRunAsUserOutputReference 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;
// range - computed: false, optional: true, required: false
this._range = new PodSecurityPolicySpecRunAsUserRangeList(this, "ra