@cdktf/provider-kubernetes
Version:
Prebuilt kubernetes Provider for Terraform CDK (cdktf)
1,216 lines (1,215 loc) • 194 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ingress = exports.IngressSpecOutputReference = exports.IngressSpecTlsList = exports.IngressSpecTlsOutputReference = exports.IngressSpecRuleList = exports.IngressSpecRuleOutputReference = exports.IngressSpecRuleHttpOutputReference = exports.IngressSpecRuleHttpPathList = exports.IngressSpecRuleHttpPathOutputReference = exports.IngressSpecRuleHttpPathBackendOutputReference = exports.IngressSpecBackendOutputReference = exports.IngressMetadataOutputReference = exports.IngressStatusList = exports.IngressStatusOutputReference = exports.IngressStatusLoadBalancerList = exports.IngressStatusLoadBalancerOutputReference = exports.IngressStatusLoadBalancerIngressList = exports.IngressStatusLoadBalancerIngressOutputReference = void 0;
exports.ingressStatusLoadBalancerIngressToTerraform = ingressStatusLoadBalancerIngressToTerraform;
exports.ingressStatusLoadBalancerIngressToHclTerraform = ingressStatusLoadBalancerIngressToHclTerraform;
exports.ingressStatusLoadBalancerToTerraform = ingressStatusLoadBalancerToTerraform;
exports.ingressStatusLoadBalancerToHclTerraform = ingressStatusLoadBalancerToHclTerraform;
exports.ingressStatusToTerraform = ingressStatusToTerraform;
exports.ingressStatusToHclTerraform = ingressStatusToHclTerraform;
exports.ingressMetadataToTerraform = ingressMetadataToTerraform;
exports.ingressMetadataToHclTerraform = ingressMetadataToHclTerraform;
exports.ingressSpecBackendToTerraform = ingressSpecBackendToTerraform;
exports.ingressSpecBackendToHclTerraform = ingressSpecBackendToHclTerraform;
exports.ingressSpecRuleHttpPathBackendToTerraform = ingressSpecRuleHttpPathBackendToTerraform;
exports.ingressSpecRuleHttpPathBackendToHclTerraform = ingressSpecRuleHttpPathBackendToHclTerraform;
exports.ingressSpecRuleHttpPathToTerraform = ingressSpecRuleHttpPathToTerraform;
exports.ingressSpecRuleHttpPathToHclTerraform = ingressSpecRuleHttpPathToHclTerraform;
exports.ingressSpecRuleHttpToTerraform = ingressSpecRuleHttpToTerraform;
exports.ingressSpecRuleHttpToHclTerraform = ingressSpecRuleHttpToHclTerraform;
exports.ingressSpecRuleToTerraform = ingressSpecRuleToTerraform;
exports.ingressSpecRuleToHclTerraform = ingressSpecRuleToHclTerraform;
exports.ingressSpecTlsToTerraform = ingressSpecTlsToTerraform;
exports.ingressSpecTlsToHclTerraform = ingressSpecTlsToHclTerraform;
exports.ingressSpecToTerraform = ingressSpecToTerraform;
exports.ingressSpecToHclTerraform = ingressSpecToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function ingressStatusLoadBalancerIngressToTerraform(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 {};
}
function ingressStatusLoadBalancerIngressToHclTerraform(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;
}
class IngressStatusLoadBalancerIngressOutputReference 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;
}
}
// hostname - computed: true, optional: false, required: false
get hostname() {
return this.getStringAttribute('hostname');
}
// ip - computed: true, optional: false, required: false
get ip() {
return this.getStringAttribute('ip');
}
}
exports.IngressStatusLoadBalancerIngressOutputReference = IngressStatusLoadBalancerIngressOutputReference;
_a = JSII_RTTI_SYMBOL_1;
IngressStatusLoadBalancerIngressOutputReference[_a] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusLoadBalancerIngressOutputReference", version: "12.0.0" };
class IngressStatusLoadBalancerIngressList 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 IngressStatusLoadBalancerIngressOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressStatusLoadBalancerIngressList = IngressStatusLoadBalancerIngressList;
_b = JSII_RTTI_SYMBOL_1;
IngressStatusLoadBalancerIngressList[_b] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusLoadBalancerIngressList", version: "12.0.0" };
function ingressStatusLoadBalancerToTerraform(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 {};
}
function ingressStatusLoadBalancerToHclTerraform(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;
}
class IngressStatusLoadBalancerOutputReference 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;
// ingress - computed: true, optional: false, required: false
this._ingress = new IngressStatusLoadBalancerIngressList(this, "ingress", 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 ingress() {
return this._ingress;
}
}
exports.IngressStatusLoadBalancerOutputReference = IngressStatusLoadBalancerOutputReference;
_c = JSII_RTTI_SYMBOL_1;
IngressStatusLoadBalancerOutputReference[_c] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusLoadBalancerOutputReference", version: "12.0.0" };
class IngressStatusLoadBalancerList 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 IngressStatusLoadBalancerOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressStatusLoadBalancerList = IngressStatusLoadBalancerList;
_d = JSII_RTTI_SYMBOL_1;
IngressStatusLoadBalancerList[_d] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusLoadBalancerList", version: "12.0.0" };
function ingressStatusToTerraform(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 {};
}
function ingressStatusToHclTerraform(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;
}
class IngressStatusOutputReference 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;
// load_balancer - computed: true, optional: false, required: false
this._loadBalancer = new IngressStatusLoadBalancerList(this, "load_balancer", 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 loadBalancer() {
return this._loadBalancer;
}
}
exports.IngressStatusOutputReference = IngressStatusOutputReference;
_e = JSII_RTTI_SYMBOL_1;
IngressStatusOutputReference[_e] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusOutputReference", version: "12.0.0" };
class IngressStatusList 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 IngressStatusOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressStatusList = IngressStatusList;
_f = JSII_RTTI_SYMBOL_1;
IngressStatusList[_f] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressStatusList", version: "12.0.0" };
function ingressMetadataToTerraform(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),
generate_name: cdktf.stringToTerraform(struct.generateName),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels),
name: cdktf.stringToTerraform(struct.name),
namespace: cdktf.stringToTerraform(struct.namespace),
};
}
function ingressMetadataToHclTerraform(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",
},
generate_name: {
value: cdktf.stringToHclTerraform(struct.generateName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressMetadataOutputReference 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._generateName !== undefined) {
hasAnyValues = true;
internalValueResult.generateName = this._generateName;
}
if (this._labels !== undefined) {
hasAnyValues = true;
internalValueResult.labels = this._labels;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._annotations = undefined;
this._generateName = undefined;
this._labels = undefined;
this._name = undefined;
this._namespace = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._annotations = value.annotations;
this._generateName = value.generateName;
this._labels = value.labels;
this._name = value.name;
this._namespace = value.namespace;
}
}
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;
}
get generateName() {
return this.getStringAttribute('generate_name');
}
set generateName(value) {
this._generateName = value;
}
resetGenerateName() {
this._generateName = undefined;
}
// Temporarily expose input value. Use with caution.
get generateNameInput() {
return this._generateName;
}
// 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;
}
get namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
resetNamespace() {
this._namespace = undefined;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
// 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.IngressMetadataOutputReference = IngressMetadataOutputReference;
_g = JSII_RTTI_SYMBOL_1;
IngressMetadataOutputReference[_g] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressMetadataOutputReference", version: "12.0.0" };
function ingressSpecBackendToTerraform(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 {
service_name: cdktf.stringToTerraform(struct.serviceName),
service_port: cdktf.stringToTerraform(struct.servicePort),
};
}
function ingressSpecBackendToHclTerraform(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 = {
service_name: {
value: cdktf.stringToHclTerraform(struct.serviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_port: {
value: cdktf.stringToHclTerraform(struct.servicePort),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecBackendOutputReference 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._serviceName !== undefined) {
hasAnyValues = true;
internalValueResult.serviceName = this._serviceName;
}
if (this._servicePort !== undefined) {
hasAnyValues = true;
internalValueResult.servicePort = this._servicePort;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._serviceName = undefined;
this._servicePort = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._serviceName = value.serviceName;
this._servicePort = value.servicePort;
}
}
get serviceName() {
return this.getStringAttribute('service_name');
}
set serviceName(value) {
this._serviceName = value;
}
resetServiceName() {
this._serviceName = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceNameInput() {
return this._serviceName;
}
get servicePort() {
return this.getStringAttribute('service_port');
}
set servicePort(value) {
this._servicePort = value;
}
resetServicePort() {
this._servicePort = undefined;
}
// Temporarily expose input value. Use with caution.
get servicePortInput() {
return this._servicePort;
}
}
exports.IngressSpecBackendOutputReference = IngressSpecBackendOutputReference;
_h = JSII_RTTI_SYMBOL_1;
IngressSpecBackendOutputReference[_h] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecBackendOutputReference", version: "12.0.0" };
function ingressSpecRuleHttpPathBackendToTerraform(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 {
service_name: cdktf.stringToTerraform(struct.serviceName),
service_port: cdktf.stringToTerraform(struct.servicePort),
};
}
function ingressSpecRuleHttpPathBackendToHclTerraform(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 = {
service_name: {
value: cdktf.stringToHclTerraform(struct.serviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_port: {
value: cdktf.stringToHclTerraform(struct.servicePort),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecRuleHttpPathBackendOutputReference 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._serviceName !== undefined) {
hasAnyValues = true;
internalValueResult.serviceName = this._serviceName;
}
if (this._servicePort !== undefined) {
hasAnyValues = true;
internalValueResult.servicePort = this._servicePort;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._serviceName = undefined;
this._servicePort = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._serviceName = value.serviceName;
this._servicePort = value.servicePort;
}
}
get serviceName() {
return this.getStringAttribute('service_name');
}
set serviceName(value) {
this._serviceName = value;
}
resetServiceName() {
this._serviceName = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceNameInput() {
return this._serviceName;
}
get servicePort() {
return this.getStringAttribute('service_port');
}
set servicePort(value) {
this._servicePort = value;
}
resetServicePort() {
this._servicePort = undefined;
}
// Temporarily expose input value. Use with caution.
get servicePortInput() {
return this._servicePort;
}
}
exports.IngressSpecRuleHttpPathBackendOutputReference = IngressSpecRuleHttpPathBackendOutputReference;
_j = JSII_RTTI_SYMBOL_1;
IngressSpecRuleHttpPathBackendOutputReference[_j] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleHttpPathBackendOutputReference", version: "12.0.0" };
function ingressSpecRuleHttpPathToTerraform(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: cdktf.stringToTerraform(struct.path),
backend: ingressSpecRuleHttpPathBackendToTerraform(struct.backend),
};
}
function ingressSpecRuleHttpPathToHclTerraform(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: {
value: cdktf.stringToHclTerraform(struct.path),
isBlock: false,
type: "simple",
storageClassType: "string",
},
backend: {
value: ingressSpecRuleHttpPathBackendToHclTerraform(struct.backend),
isBlock: true,
type: "list",
storageClassType: "IngressSpecRuleHttpPathBackendList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecRuleHttpPathOutputReference 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;
// backend - computed: false, optional: true, required: false
this._backend = new IngressSpecRuleHttpPathBackendOutputReference(this, "backend");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._path !== undefined) {
hasAnyValues = true;
internalValueResult.path = this._path;
}
if (this._backend?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.backend = this._backend?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._path = undefined;
this._backend.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._path = value.path;
this._backend.internalValue = value.backend;
}
}
get path() {
return this.getStringAttribute('path');
}
set path(value) {
this._path = value;
}
resetPath() {
this._path = undefined;
}
// Temporarily expose input value. Use with caution.
get pathInput() {
return this._path;
}
get backend() {
return this._backend;
}
putBackend(value) {
this._backend.internalValue = value;
}
resetBackend() {
this._backend.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get backendInput() {
return this._backend.internalValue;
}
}
exports.IngressSpecRuleHttpPathOutputReference = IngressSpecRuleHttpPathOutputReference;
_k = JSII_RTTI_SYMBOL_1;
IngressSpecRuleHttpPathOutputReference[_k] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleHttpPathOutputReference", version: "12.0.0" };
class IngressSpecRuleHttpPathList 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 IngressSpecRuleHttpPathOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressSpecRuleHttpPathList = IngressSpecRuleHttpPathList;
_l = JSII_RTTI_SYMBOL_1;
IngressSpecRuleHttpPathList[_l] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleHttpPathList", version: "12.0.0" };
function ingressSpecRuleHttpToTerraform(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: cdktf.listMapper(ingressSpecRuleHttpPathToTerraform, true)(struct.path),
};
}
function ingressSpecRuleHttpToHclTerraform(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: {
value: cdktf.listMapperHcl(ingressSpecRuleHttpPathToHclTerraform, true)(struct.path),
isBlock: true,
type: "list",
storageClassType: "IngressSpecRuleHttpPathList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecRuleHttpOutputReference 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;
// path - computed: false, optional: false, required: true
this._path = new IngressSpecRuleHttpPathList(this, "path", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._path?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.path = this._path?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._path.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._path.internalValue = value.path;
}
}
get path() {
return this._path;
}
putPath(value) {
this._path.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get pathInput() {
return this._path.internalValue;
}
}
exports.IngressSpecRuleHttpOutputReference = IngressSpecRuleHttpOutputReference;
_m = JSII_RTTI_SYMBOL_1;
IngressSpecRuleHttpOutputReference[_m] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleHttpOutputReference", version: "12.0.0" };
function ingressSpecRuleToTerraform(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 {
host: cdktf.stringToTerraform(struct.host),
http: ingressSpecRuleHttpToTerraform(struct.http),
};
}
function ingressSpecRuleToHclTerraform(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 = {
host: {
value: cdktf.stringToHclTerraform(struct.host),
isBlock: false,
type: "simple",
storageClassType: "string",
},
http: {
value: ingressSpecRuleHttpToHclTerraform(struct.http),
isBlock: true,
type: "list",
storageClassType: "IngressSpecRuleHttpList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecRuleOutputReference 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;
// http - computed: false, optional: false, required: true
this._http = new IngressSpecRuleHttpOutputReference(this, "http");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._host !== undefined) {
hasAnyValues = true;
internalValueResult.host = this._host;
}
if (this._http?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.http = this._http?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._host = undefined;
this._http.internalValue = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._host = value.host;
this._http.internalValue = value.http;
}
}
get host() {
return this.getStringAttribute('host');
}
set host(value) {
this._host = value;
}
resetHost() {
this._host = undefined;
}
// Temporarily expose input value. Use with caution.
get hostInput() {
return this._host;
}
get http() {
return this._http;
}
putHttp(value) {
this._http.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get httpInput() {
return this._http.internalValue;
}
}
exports.IngressSpecRuleOutputReference = IngressSpecRuleOutputReference;
_o = JSII_RTTI_SYMBOL_1;
IngressSpecRuleOutputReference[_o] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleOutputReference", version: "12.0.0" };
class IngressSpecRuleList 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 IngressSpecRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressSpecRuleList = IngressSpecRuleList;
_p = JSII_RTTI_SYMBOL_1;
IngressSpecRuleList[_p] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecRuleList", version: "12.0.0" };
function ingressSpecTlsToTerraform(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 {
hosts: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.hosts),
secret_name: cdktf.stringToTerraform(struct.secretName),
};
}
function ingressSpecTlsToHclTerraform(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 = {
hosts: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.hosts),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
secret_name: {
value: cdktf.stringToHclTerraform(struct.secretName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecTlsOutputReference 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._hosts !== undefined) {
hasAnyValues = true;
internalValueResult.hosts = this._hosts;
}
if (this._secretName !== undefined) {
hasAnyValues = true;
internalValueResult.secretName = this._secretName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._hosts = undefined;
this._secretName = 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._hosts = value.hosts;
this._secretName = value.secretName;
}
}
get hosts() {
return this.getListAttribute('hosts');
}
set hosts(value) {
this._hosts = value;
}
resetHosts() {
this._hosts = undefined;
}
// Temporarily expose input value. Use with caution.
get hostsInput() {
return this._hosts;
}
get secretName() {
return this.getStringAttribute('secret_name');
}
set secretName(value) {
this._secretName = value;
}
resetSecretName() {
this._secretName = undefined;
}
// Temporarily expose input value. Use with caution.
get secretNameInput() {
return this._secretName;
}
}
exports.IngressSpecTlsOutputReference = IngressSpecTlsOutputReference;
_q = JSII_RTTI_SYMBOL_1;
IngressSpecTlsOutputReference[_q] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecTlsOutputReference", version: "12.0.0" };
class IngressSpecTlsList 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 IngressSpecTlsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.IngressSpecTlsList = IngressSpecTlsList;
_r = JSII_RTTI_SYMBOL_1;
IngressSpecTlsList[_r] = { fqn: "@cdktf/provider-kubernetes.ingress.IngressSpecTlsList", version: "12.0.0" };
function ingressSpecToTerraform(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 {
ingress_class_name: cdktf.stringToTerraform(struct.ingressClassName),
backend: ingressSpecBackendToTerraform(struct.backend),
rule: cdktf.listMapper(ingressSpecRuleToTerraform, true)(struct.rule),
tls: cdktf.listMapper(ingressSpecTlsToTerraform, true)(struct.tls),
};
}
function ingressSpecToHclTerraform(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 = {
ingress_class_name: {
value: cdktf.stringToHclTerraform(struct.ingressClassName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
backend: {
value: ingressSpecBackendToHclTerraform(struct.backend),
isBlock: true,
type: "list",
storageClassType: "IngressSpecBackendList",
},
rule: {
value: cdktf.listMapperHcl(ingressSpecRuleToHclTerraform, true)(struct.rule),
isBlock: true,
type: "list",
storageClassType: "IngressSpecRuleList",
},
tls: {
value: cdktf.listMapperHcl(ingressSpecTlsToHclTerraform, true)(struct.tls),
isBlock: true,
type: "list",
storageClassType: "IngressSpecTlsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class IngressSpecOutputReference 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;
// backend - computed: false, optional: true, required: false
this._backend = new IngressSpecBackendOutputReference(this, "backend");
// rule - computed: false, optional: true, required: false
this._rule = new IngressSpecRuleList(this, "rule", false);
// tls - computed: false, optional: true, required: false
this._tls = new IngressSpecTlsList(this, "tls", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._ingressClassName !== undefined) {
hasAnyValues = true;
internalValueResult.ingressClassName = this._ingressClassName;
}
if (this._backend?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.backend = this._backend?.internalValue;
}
if (this._rule?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.rule = this._rule?.internalValue;
}
if (this._tls?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.tls = this._tls?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._ingressClassName = undefined;
this._backend.internalValue = undefined;
this._rule.internalValue = undefined;
this._tls.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._ingressClassName = value.ingressClassName;
this._backend.internalValue = value.backend;
this._rule.internalValue = value.rule;