@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,220 lines • 201 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RedhatOpenshiftCluster = exports.RedhatOpenshiftClusterWorkerProfileOutputReference = exports.redhatOpenshiftClusterWorkerProfileToHclTerraform = exports.redhatOpenshiftClusterWorkerProfileToTerraform = exports.RedhatOpenshiftClusterTimeoutsOutputReference = exports.redhatOpenshiftClusterTimeoutsToHclTerraform = exports.redhatOpenshiftClusterTimeoutsToTerraform = exports.RedhatOpenshiftClusterServicePrincipalOutputReference = exports.redhatOpenshiftClusterServicePrincipalToHclTerraform = exports.redhatOpenshiftClusterServicePrincipalToTerraform = exports.RedhatOpenshiftClusterNetworkProfileOutputReference = exports.redhatOpenshiftClusterNetworkProfileToHclTerraform = exports.redhatOpenshiftClusterNetworkProfileToTerraform = exports.RedhatOpenshiftClusterMainProfileOutputReference = exports.redhatOpenshiftClusterMainProfileToHclTerraform = exports.redhatOpenshiftClusterMainProfileToTerraform = exports.RedhatOpenshiftClusterIngressProfileOutputReference = exports.redhatOpenshiftClusterIngressProfileToHclTerraform = exports.redhatOpenshiftClusterIngressProfileToTerraform = exports.RedhatOpenshiftClusterClusterProfileOutputReference = exports.redhatOpenshiftClusterClusterProfileToHclTerraform = exports.redhatOpenshiftClusterClusterProfileToTerraform = exports.RedhatOpenshiftClusterApiServerProfileOutputReference = exports.redhatOpenshiftClusterApiServerProfileToHclTerraform = exports.redhatOpenshiftClusterApiServerProfileToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function redhatOpenshiftClusterApiServerProfileToTerraform(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 {
visibility: cdktf.stringToTerraform(struct.visibility),
};
}
exports.redhatOpenshiftClusterApiServerProfileToTerraform = redhatOpenshiftClusterApiServerProfileToTerraform;
function redhatOpenshiftClusterApiServerProfileToHclTerraform(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 = {
visibility: {
value: cdktf.stringToHclTerraform(struct.visibility),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterApiServerProfileToHclTerraform = redhatOpenshiftClusterApiServerProfileToHclTerraform;
class RedhatOpenshiftClusterApiServerProfileOutputReference 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._visibility !== undefined) {
hasAnyValues = true;
internalValueResult.visibility = this._visibility;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._visibility = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._visibility = value.visibility;
}
}
// ip_address - computed: true, optional: false, required: false
get ipAddress() {
return this.getStringAttribute('ip_address');
}
// url - computed: true, optional: false, required: false
get url() {
return this.getStringAttribute('url');
}
get visibility() {
return this.getStringAttribute('visibility');
}
set visibility(value) {
this._visibility = value;
}
// Temporarily expose input value. Use with caution.
get visibilityInput() {
return this._visibility;
}
}
exports.RedhatOpenshiftClusterApiServerProfileOutputReference = RedhatOpenshiftClusterApiServerProfileOutputReference;
_a = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterApiServerProfileOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterApiServerProfileOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterClusterProfileToTerraform(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 {
domain: cdktf.stringToTerraform(struct.domain),
fips_enabled: cdktf.booleanToTerraform(struct.fipsEnabled),
managed_resource_group_name: cdktf.stringToTerraform(struct.managedResourceGroupName),
pull_secret: cdktf.stringToTerraform(struct.pullSecret),
version: cdktf.stringToTerraform(struct.version),
};
}
exports.redhatOpenshiftClusterClusterProfileToTerraform = redhatOpenshiftClusterClusterProfileToTerraform;
function redhatOpenshiftClusterClusterProfileToHclTerraform(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 = {
domain: {
value: cdktf.stringToHclTerraform(struct.domain),
isBlock: false,
type: "simple",
storageClassType: "string",
},
fips_enabled: {
value: cdktf.booleanToHclTerraform(struct.fipsEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
managed_resource_group_name: {
value: cdktf.stringToHclTerraform(struct.managedResourceGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
pull_secret: {
value: cdktf.stringToHclTerraform(struct.pullSecret),
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.redhatOpenshiftClusterClusterProfileToHclTerraform = redhatOpenshiftClusterClusterProfileToHclTerraform;
class RedhatOpenshiftClusterClusterProfileOutputReference 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._domain !== undefined) {
hasAnyValues = true;
internalValueResult.domain = this._domain;
}
if (this._fipsEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.fipsEnabled = this._fipsEnabled;
}
if (this._managedResourceGroupName !== undefined) {
hasAnyValues = true;
internalValueResult.managedResourceGroupName = this._managedResourceGroupName;
}
if (this._pullSecret !== undefined) {
hasAnyValues = true;
internalValueResult.pullSecret = this._pullSecret;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._domain = undefined;
this._fipsEnabled = undefined;
this._managedResourceGroupName = undefined;
this._pullSecret = undefined;
this._version = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._domain = value.domain;
this._fipsEnabled = value.fipsEnabled;
this._managedResourceGroupName = value.managedResourceGroupName;
this._pullSecret = value.pullSecret;
this._version = value.version;
}
}
get domain() {
return this.getStringAttribute('domain');
}
set domain(value) {
this._domain = value;
}
// Temporarily expose input value. Use with caution.
get domainInput() {
return this._domain;
}
get fipsEnabled() {
return this.getBooleanAttribute('fips_enabled');
}
set fipsEnabled(value) {
this._fipsEnabled = value;
}
resetFipsEnabled() {
this._fipsEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get fipsEnabledInput() {
return this._fipsEnabled;
}
get managedResourceGroupName() {
return this.getStringAttribute('managed_resource_group_name');
}
set managedResourceGroupName(value) {
this._managedResourceGroupName = value;
}
resetManagedResourceGroupName() {
this._managedResourceGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get managedResourceGroupNameInput() {
return this._managedResourceGroupName;
}
get pullSecret() {
return this.getStringAttribute('pull_secret');
}
set pullSecret(value) {
this._pullSecret = value;
}
resetPullSecret() {
this._pullSecret = undefined;
}
// Temporarily expose input value. Use with caution.
get pullSecretInput() {
return this._pullSecret;
}
// resource_group_id - computed: true, optional: false, required: false
get resourceGroupId() {
return this.getStringAttribute('resource_group_id');
}
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.RedhatOpenshiftClusterClusterProfileOutputReference = RedhatOpenshiftClusterClusterProfileOutputReference;
_b = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterClusterProfileOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterClusterProfileOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterIngressProfileToTerraform(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 {
visibility: cdktf.stringToTerraform(struct.visibility),
};
}
exports.redhatOpenshiftClusterIngressProfileToTerraform = redhatOpenshiftClusterIngressProfileToTerraform;
function redhatOpenshiftClusterIngressProfileToHclTerraform(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 = {
visibility: {
value: cdktf.stringToHclTerraform(struct.visibility),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterIngressProfileToHclTerraform = redhatOpenshiftClusterIngressProfileToHclTerraform;
class RedhatOpenshiftClusterIngressProfileOutputReference 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._visibility !== undefined) {
hasAnyValues = true;
internalValueResult.visibility = this._visibility;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._visibility = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._visibility = value.visibility;
}
}
// ip_address - computed: true, optional: false, required: false
get ipAddress() {
return this.getStringAttribute('ip_address');
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
get visibility() {
return this.getStringAttribute('visibility');
}
set visibility(value) {
this._visibility = value;
}
// Temporarily expose input value. Use with caution.
get visibilityInput() {
return this._visibility;
}
}
exports.RedhatOpenshiftClusterIngressProfileOutputReference = RedhatOpenshiftClusterIngressProfileOutputReference;
_c = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterIngressProfileOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterIngressProfileOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterMainProfileToTerraform(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 {
disk_encryption_set_id: cdktf.stringToTerraform(struct.diskEncryptionSetId),
encryption_at_host_enabled: cdktf.booleanToTerraform(struct.encryptionAtHostEnabled),
subnet_id: cdktf.stringToTerraform(struct.subnetId),
vm_size: cdktf.stringToTerraform(struct.vmSize),
};
}
exports.redhatOpenshiftClusterMainProfileToTerraform = redhatOpenshiftClusterMainProfileToTerraform;
function redhatOpenshiftClusterMainProfileToHclTerraform(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 = {
disk_encryption_set_id: {
value: cdktf.stringToHclTerraform(struct.diskEncryptionSetId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
encryption_at_host_enabled: {
value: cdktf.booleanToHclTerraform(struct.encryptionAtHostEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
subnet_id: {
value: cdktf.stringToHclTerraform(struct.subnetId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vm_size: {
value: cdktf.stringToHclTerraform(struct.vmSize),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterMainProfileToHclTerraform = redhatOpenshiftClusterMainProfileToHclTerraform;
class RedhatOpenshiftClusterMainProfileOutputReference 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._diskEncryptionSetId !== undefined) {
hasAnyValues = true;
internalValueResult.diskEncryptionSetId = this._diskEncryptionSetId;
}
if (this._encryptionAtHostEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.encryptionAtHostEnabled = this._encryptionAtHostEnabled;
}
if (this._subnetId !== undefined) {
hasAnyValues = true;
internalValueResult.subnetId = this._subnetId;
}
if (this._vmSize !== undefined) {
hasAnyValues = true;
internalValueResult.vmSize = this._vmSize;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._diskEncryptionSetId = undefined;
this._encryptionAtHostEnabled = undefined;
this._subnetId = undefined;
this._vmSize = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._diskEncryptionSetId = value.diskEncryptionSetId;
this._encryptionAtHostEnabled = value.encryptionAtHostEnabled;
this._subnetId = value.subnetId;
this._vmSize = value.vmSize;
}
}
get diskEncryptionSetId() {
return this.getStringAttribute('disk_encryption_set_id');
}
set diskEncryptionSetId(value) {
this._diskEncryptionSetId = value;
}
resetDiskEncryptionSetId() {
this._diskEncryptionSetId = undefined;
}
// Temporarily expose input value. Use with caution.
get diskEncryptionSetIdInput() {
return this._diskEncryptionSetId;
}
get encryptionAtHostEnabled() {
return this.getBooleanAttribute('encryption_at_host_enabled');
}
set encryptionAtHostEnabled(value) {
this._encryptionAtHostEnabled = value;
}
resetEncryptionAtHostEnabled() {
this._encryptionAtHostEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptionAtHostEnabledInput() {
return this._encryptionAtHostEnabled;
}
get subnetId() {
return this.getStringAttribute('subnet_id');
}
set subnetId(value) {
this._subnetId = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdInput() {
return this._subnetId;
}
get vmSize() {
return this.getStringAttribute('vm_size');
}
set vmSize(value) {
this._vmSize = value;
}
// Temporarily expose input value. Use with caution.
get vmSizeInput() {
return this._vmSize;
}
}
exports.RedhatOpenshiftClusterMainProfileOutputReference = RedhatOpenshiftClusterMainProfileOutputReference;
_d = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterMainProfileOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterMainProfileOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterNetworkProfileToTerraform(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 {
outbound_type: cdktf.stringToTerraform(struct.outboundType),
pod_cidr: cdktf.stringToTerraform(struct.podCidr),
preconfigured_network_security_group_enabled: cdktf.booleanToTerraform(struct.preconfiguredNetworkSecurityGroupEnabled),
service_cidr: cdktf.stringToTerraform(struct.serviceCidr),
};
}
exports.redhatOpenshiftClusterNetworkProfileToTerraform = redhatOpenshiftClusterNetworkProfileToTerraform;
function redhatOpenshiftClusterNetworkProfileToHclTerraform(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 = {
outbound_type: {
value: cdktf.stringToHclTerraform(struct.outboundType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
pod_cidr: {
value: cdktf.stringToHclTerraform(struct.podCidr),
isBlock: false,
type: "simple",
storageClassType: "string",
},
preconfigured_network_security_group_enabled: {
value: cdktf.booleanToHclTerraform(struct.preconfiguredNetworkSecurityGroupEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
service_cidr: {
value: cdktf.stringToHclTerraform(struct.serviceCidr),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterNetworkProfileToHclTerraform = redhatOpenshiftClusterNetworkProfileToHclTerraform;
class RedhatOpenshiftClusterNetworkProfileOutputReference 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._outboundType !== undefined) {
hasAnyValues = true;
internalValueResult.outboundType = this._outboundType;
}
if (this._podCidr !== undefined) {
hasAnyValues = true;
internalValueResult.podCidr = this._podCidr;
}
if (this._preconfiguredNetworkSecurityGroupEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.preconfiguredNetworkSecurityGroupEnabled = this._preconfiguredNetworkSecurityGroupEnabled;
}
if (this._serviceCidr !== undefined) {
hasAnyValues = true;
internalValueResult.serviceCidr = this._serviceCidr;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._outboundType = undefined;
this._podCidr = undefined;
this._preconfiguredNetworkSecurityGroupEnabled = undefined;
this._serviceCidr = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._outboundType = value.outboundType;
this._podCidr = value.podCidr;
this._preconfiguredNetworkSecurityGroupEnabled = value.preconfiguredNetworkSecurityGroupEnabled;
this._serviceCidr = value.serviceCidr;
}
}
get outboundType() {
return this.getStringAttribute('outbound_type');
}
set outboundType(value) {
this._outboundType = value;
}
resetOutboundType() {
this._outboundType = undefined;
}
// Temporarily expose input value. Use with caution.
get outboundTypeInput() {
return this._outboundType;
}
get podCidr() {
return this.getStringAttribute('pod_cidr');
}
set podCidr(value) {
this._podCidr = value;
}
// Temporarily expose input value. Use with caution.
get podCidrInput() {
return this._podCidr;
}
get preconfiguredNetworkSecurityGroupEnabled() {
return this.getBooleanAttribute('preconfigured_network_security_group_enabled');
}
set preconfiguredNetworkSecurityGroupEnabled(value) {
this._preconfiguredNetworkSecurityGroupEnabled = value;
}
resetPreconfiguredNetworkSecurityGroupEnabled() {
this._preconfiguredNetworkSecurityGroupEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get preconfiguredNetworkSecurityGroupEnabledInput() {
return this._preconfiguredNetworkSecurityGroupEnabled;
}
get serviceCidr() {
return this.getStringAttribute('service_cidr');
}
set serviceCidr(value) {
this._serviceCidr = value;
}
// Temporarily expose input value. Use with caution.
get serviceCidrInput() {
return this._serviceCidr;
}
}
exports.RedhatOpenshiftClusterNetworkProfileOutputReference = RedhatOpenshiftClusterNetworkProfileOutputReference;
_e = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterNetworkProfileOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterNetworkProfileOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterServicePrincipalToTerraform(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 {
client_id: cdktf.stringToTerraform(struct.clientId),
client_secret: cdktf.stringToTerraform(struct.clientSecret),
};
}
exports.redhatOpenshiftClusterServicePrincipalToTerraform = redhatOpenshiftClusterServicePrincipalToTerraform;
function redhatOpenshiftClusterServicePrincipalToHclTerraform(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 = {
client_id: {
value: cdktf.stringToHclTerraform(struct.clientId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
client_secret: {
value: cdktf.stringToHclTerraform(struct.clientSecret),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterServicePrincipalToHclTerraform = redhatOpenshiftClusterServicePrincipalToHclTerraform;
class RedhatOpenshiftClusterServicePrincipalOutputReference 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._clientId !== undefined) {
hasAnyValues = true;
internalValueResult.clientId = this._clientId;
}
if (this._clientSecret !== undefined) {
hasAnyValues = true;
internalValueResult.clientSecret = this._clientSecret;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._clientId = undefined;
this._clientSecret = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._clientId = value.clientId;
this._clientSecret = value.clientSecret;
}
}
get clientId() {
return this.getStringAttribute('client_id');
}
set clientId(value) {
this._clientId = value;
}
// Temporarily expose input value. Use with caution.
get clientIdInput() {
return this._clientId;
}
get clientSecret() {
return this.getStringAttribute('client_secret');
}
set clientSecret(value) {
this._clientSecret = value;
}
// Temporarily expose input value. Use with caution.
get clientSecretInput() {
return this._clientSecret;
}
}
exports.RedhatOpenshiftClusterServicePrincipalOutputReference = RedhatOpenshiftClusterServicePrincipalOutputReference;
_f = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterServicePrincipalOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterServicePrincipalOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterTimeoutsToTerraform(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),
read: cdktf.stringToTerraform(struct.read),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.redhatOpenshiftClusterTimeoutsToTerraform = redhatOpenshiftClusterTimeoutsToTerraform;
function redhatOpenshiftClusterTimeoutsToHclTerraform(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",
},
read: {
value: cdktf.stringToHclTerraform(struct.read),
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.redhatOpenshiftClusterTimeoutsToHclTerraform = redhatOpenshiftClusterTimeoutsToHclTerraform;
class RedhatOpenshiftClusterTimeoutsOutputReference 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._read !== undefined) {
hasAnyValues = true;
internalValueResult.read = this._read;
}
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._read = 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._read = value.read;
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 read() {
return this.getStringAttribute('read');
}
set read(value) {
this._read = value;
}
resetRead() {
this._read = undefined;
}
// Temporarily expose input value. Use with caution.
get readInput() {
return this._read;
}
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.RedhatOpenshiftClusterTimeoutsOutputReference = RedhatOpenshiftClusterTimeoutsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterTimeoutsOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterTimeoutsOutputReference", version: "12.27.0" };
function redhatOpenshiftClusterWorkerProfileToTerraform(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 {
disk_encryption_set_id: cdktf.stringToTerraform(struct.diskEncryptionSetId),
disk_size_gb: cdktf.numberToTerraform(struct.diskSizeGb),
encryption_at_host_enabled: cdktf.booleanToTerraform(struct.encryptionAtHostEnabled),
node_count: cdktf.numberToTerraform(struct.nodeCount),
subnet_id: cdktf.stringToTerraform(struct.subnetId),
vm_size: cdktf.stringToTerraform(struct.vmSize),
};
}
exports.redhatOpenshiftClusterWorkerProfileToTerraform = redhatOpenshiftClusterWorkerProfileToTerraform;
function redhatOpenshiftClusterWorkerProfileToHclTerraform(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 = {
disk_encryption_set_id: {
value: cdktf.stringToHclTerraform(struct.diskEncryptionSetId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
disk_size_gb: {
value: cdktf.numberToHclTerraform(struct.diskSizeGb),
isBlock: false,
type: "simple",
storageClassType: "number",
},
encryption_at_host_enabled: {
value: cdktf.booleanToHclTerraform(struct.encryptionAtHostEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
node_count: {
value: cdktf.numberToHclTerraform(struct.nodeCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
subnet_id: {
value: cdktf.stringToHclTerraform(struct.subnetId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vm_size: {
value: cdktf.stringToHclTerraform(struct.vmSize),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.redhatOpenshiftClusterWorkerProfileToHclTerraform = redhatOpenshiftClusterWorkerProfileToHclTerraform;
class RedhatOpenshiftClusterWorkerProfileOutputReference 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._diskEncryptionSetId !== undefined) {
hasAnyValues = true;
internalValueResult.diskEncryptionSetId = this._diskEncryptionSetId;
}
if (this._diskSizeGb !== undefined) {
hasAnyValues = true;
internalValueResult.diskSizeGb = this._diskSizeGb;
}
if (this._encryptionAtHostEnabled !== undefined) {
hasAnyValues = true;
internalValueResult.encryptionAtHostEnabled = this._encryptionAtHostEnabled;
}
if (this._nodeCount !== undefined) {
hasAnyValues = true;
internalValueResult.nodeCount = this._nodeCount;
}
if (this._subnetId !== undefined) {
hasAnyValues = true;
internalValueResult.subnetId = this._subnetId;
}
if (this._vmSize !== undefined) {
hasAnyValues = true;
internalValueResult.vmSize = this._vmSize;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._diskEncryptionSetId = undefined;
this._diskSizeGb = undefined;
this._encryptionAtHostEnabled = undefined;
this._nodeCount = undefined;
this._subnetId = undefined;
this._vmSize = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._diskEncryptionSetId = value.diskEncryptionSetId;
this._diskSizeGb = value.diskSizeGb;
this._encryptionAtHostEnabled = value.encryptionAtHostEnabled;
this._nodeCount = value.nodeCount;
this._subnetId = value.subnetId;
this._vmSize = value.vmSize;
}
}
get diskEncryptionSetId() {
return this.getStringAttribute('disk_encryption_set_id');
}
set diskEncryptionSetId(value) {
this._diskEncryptionSetId = value;
}
resetDiskEncryptionSetId() {
this._diskEncryptionSetId = undefined;
}
// Temporarily expose input value. Use with caution.
get diskEncryptionSetIdInput() {
return this._diskEncryptionSetId;
}
get diskSizeGb() {
return this.getNumberAttribute('disk_size_gb');
}
set diskSizeGb(value) {
this._diskSizeGb = value;
}
// Temporarily expose input value. Use with caution.
get diskSizeGbInput() {
return this._diskSizeGb;
}
get encryptionAtHostEnabled() {
return this.getBooleanAttribute('encryption_at_host_enabled');
}
set encryptionAtHostEnabled(value) {
this._encryptionAtHostEnabled = value;
}
resetEncryptionAtHostEnabled() {
this._encryptionAtHostEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptionAtHostEnabledInput() {
return this._encryptionAtHostEnabled;
}
get nodeCount() {
return this.getNumberAttribute('node_count');
}
set nodeCount(value) {
this._nodeCount = value;
}
// Temporarily expose input value. Use with caution.
get nodeCountInput() {
return this._nodeCount;
}
get subnetId() {
return this.getStringAttribute('subnet_id');
}
set subnetId(value) {
this._subnetId = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdInput() {
return this._subnetId;
}
get vmSize() {
return this.getStringAttribute('vm_size');
}
set vmSize(value) {
this._vmSize = value;
}
// Temporarily expose input value. Use with caution.
get vmSizeInput() {
return this._vmSize;
}
}
exports.RedhatOpenshiftClusterWorkerProfileOutputReference = RedhatOpenshiftClusterWorkerProfileOutputReference;
_h = JSII_RTTI_SYMBOL_1;
RedhatOpenshiftClusterWorkerProfileOutputReference[_h] = { fqn: "@cdktf/provider-azurerm.redhatOpenshiftCluster.RedhatOpenshiftClusterWorkerProfileOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redhat_openshift_cluster azurerm_redhat_openshift_cluster}
*/
class RedhatOpenshiftCluster extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a RedhatOpenshiftCluster 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 RedhatOpenshiftCluster to import
* @param importFromId The id of the existing RedhatOpenshiftCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redhat_openshift_cluster#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the RedhatOpenshiftCluster to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_redhat_openshift_cluster", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/redhat_openshift_cluster azurerm_redhat_openshift_cluster} 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 RedhatOpenshiftClusterConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_redhat_openshift_cluster',
terraformGeneratorMetadata: {
providerName: 'azurerm',
providerVersion: '3.116.0',
providerVersionConstraint: '~> 3.10'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// api_server_profile - computed: false, optional: false, required: true
this._apiServerProfile = new RedhatOpenshiftClusterApiServerProfileOutputReference(this, "api_server_profile");
// cluster_profile - computed: false, optional: false, required: true
this._clusterProfile = new RedhatOpenshiftClusterClusterProfileOutputReference(this, "cluster_profile");
// ingress_profile - computed: false, optional: false, required: true
this._ingressProfile = new RedhatOpenshiftClusterIngressProfileOutputReference(this, "ingress_profile");
// main_profile - computed: false, optional: false, required: true
this._mainProfile = new RedhatOpenshiftClusterMainProfileOutputReference(this, "main_profile");
// network_profile - computed: false, optional: false, required: true
this._networkProfile = new RedhatOpenshiftClusterNetworkProfileOutputReference(this, "network_profile");
// service_principal - computed: false, optional: false, required: true
this._servicePrincipal = new RedhatOpenshiftClusterServicePrincipalOutputReference(this, "service_principal");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new RedhatOpenshiftClusterTimeoutsOutputReference(this, "timeouts");
// worker_profile - computed: false, optional: false, required: true
this._workerProfile = new RedhatOpenshiftClusterWorkerProfileOutputReference(this, "worker_profile");
this._id = config.id;
this._location = config.location;
this._name = config.name;
this._resourceGroupName = config.resourceGroupName;
this._tags = config.tags;
this._apiServerProfile.internalValue = config.apiServerProfile;
this._clusterProfile.internalValue = config.clusterProfile;
this._ingressProfile.internalValue = config.ingressProfile;
this._mainProfile.internalValue = config.mainProfile;
this._networkProfile.internalValue = config.networkProfile;
this._servicePrincipal.internalValue = config.servicePrincipal;
this._timeouts.internalValue = config.timeouts;
this._workerProfile.internalValue = config.workerProfile;
}
// ==========
// ATTRIBUTES
// ==========
// console_url - computed: true, optional: false, required: false
get consoleUrl() {
return this.getStringAttribute('console_url');
}
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 location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get resourceGroupName() {
return this.getStringAttribute('resource_group_name');
}
set resourceGroupName(value) {
this._resourceGroupName = value;
}
// Temporarily expose input value. Use with caution.
get resourceGroupNameInput() {
return this._resourceGroupName;
}
get tags() {
return this.