@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,184 lines • 164 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyVault = exports.KeyVaultTimeoutsOutputReference = exports.keyVaultTimeoutsToHclTerraform = exports.keyVaultTimeoutsToTerraform = exports.KeyVaultNetworkAclsOutputReference = exports.keyVaultNetworkAclsToHclTerraform = exports.keyVaultNetworkAclsToTerraform = exports.KeyVaultContactList = exports.KeyVaultContactOutputReference = exports.keyVaultContactToHclTerraform = exports.keyVaultContactToTerraform = exports.KeyVaultAccessPolicyList = exports.KeyVaultAccessPolicyOutputReference = exports.keyVaultAccessPolicyToHclTerraform = exports.keyVaultAccessPolicyToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function keyVaultAccessPolicyToTerraform(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 {
application_id: struct.applicationId === undefined ? null : cdktf.stringToTerraform(struct.applicationId),
certificate_permissions: struct.certificatePermissions === undefined ? null : cdktf.listMapper(cdktf.stringToTerraform, false)(struct.certificatePermissions),
key_permissions: struct.keyPermissions === undefined ? null : cdktf.listMapper(cdktf.stringToTerraform, false)(struct.keyPermissions),
object_id: struct.objectId === undefined ? null : cdktf.stringToTerraform(struct.objectId),
secret_permissions: struct.secretPermissions === undefined ? null : cdktf.listMapper(cdktf.stringToTerraform, false)(struct.secretPermissions),
storage_permissions: struct.storagePermissions === undefined ? null : cdktf.listMapper(cdktf.stringToTerraform, false)(struct.storagePermissions),
tenant_id: struct.tenantId === undefined ? null : cdktf.stringToTerraform(struct.tenantId),
};
}
exports.keyVaultAccessPolicyToTerraform = keyVaultAccessPolicyToTerraform;
function keyVaultAccessPolicyToHclTerraform(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 = {
application_id: {
value: struct.applicationId === undefined ? null : cdktf.stringToHclTerraform(struct.applicationId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
certificate_permissions: {
value: struct.certificatePermissions === undefined ? null : cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.certificatePermissions),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
key_permissions: {
value: struct.keyPermissions === undefined ? null : cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.keyPermissions),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
object_id: {
value: struct.objectId === undefined ? null : cdktf.stringToHclTerraform(struct.objectId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
secret_permissions: {
value: struct.secretPermissions === undefined ? null : cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.secretPermissions),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
storage_permissions: {
value: struct.storagePermissions === undefined ? null : cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.storagePermissions),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
tenant_id: {
value: struct.tenantId === undefined ? null : cdktf.stringToHclTerraform(struct.tenantId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.keyVaultAccessPolicyToHclTerraform = keyVaultAccessPolicyToHclTerraform;
class KeyVaultAccessPolicyOutputReference 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._applicationId !== undefined) {
hasAnyValues = true;
internalValueResult.applicationId = this._applicationId;
}
if (this._certificatePermissions !== undefined) {
hasAnyValues = true;
internalValueResult.certificatePermissions = this._certificatePermissions;
}
if (this._keyPermissions !== undefined) {
hasAnyValues = true;
internalValueResult.keyPermissions = this._keyPermissions;
}
if (this._objectId !== undefined) {
hasAnyValues = true;
internalValueResult.objectId = this._objectId;
}
if (this._secretPermissions !== undefined) {
hasAnyValues = true;
internalValueResult.secretPermissions = this._secretPermissions;
}
if (this._storagePermissions !== undefined) {
hasAnyValues = true;
internalValueResult.storagePermissions = this._storagePermissions;
}
if (this._tenantId !== undefined) {
hasAnyValues = true;
internalValueResult.tenantId = this._tenantId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._applicationId = undefined;
this._certificatePermissions = undefined;
this._keyPermissions = undefined;
this._objectId = undefined;
this._secretPermissions = undefined;
this._storagePermissions = undefined;
this._tenantId = 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._applicationId = value.applicationId;
this._certificatePermissions = value.certificatePermissions;
this._keyPermissions = value.keyPermissions;
this._objectId = value.objectId;
this._secretPermissions = value.secretPermissions;
this._storagePermissions = value.storagePermissions;
this._tenantId = value.tenantId;
}
}
get applicationId() {
return this.getStringAttribute('application_id');
}
set applicationId(value) {
this._applicationId = value;
}
resetApplicationId() {
this._applicationId = undefined;
}
// Temporarily expose input value. Use with caution.
get applicationIdInput() {
return this._applicationId;
}
get certificatePermissions() {
return this.getListAttribute('certificate_permissions');
}
set certificatePermissions(value) {
this._certificatePermissions = value;
}
resetCertificatePermissions() {
this._certificatePermissions = undefined;
}
// Temporarily expose input value. Use with caution.
get certificatePermissionsInput() {
return this._certificatePermissions;
}
get keyPermissions() {
return this.getListAttribute('key_permissions');
}
set keyPermissions(value) {
this._keyPermissions = value;
}
resetKeyPermissions() {
this._keyPermissions = undefined;
}
// Temporarily expose input value. Use with caution.
get keyPermissionsInput() {
return this._keyPermissions;
}
get objectId() {
return this.getStringAttribute('object_id');
}
set objectId(value) {
this._objectId = value;
}
resetObjectId() {
this._objectId = undefined;
}
// Temporarily expose input value. Use with caution.
get objectIdInput() {
return this._objectId;
}
get secretPermissions() {
return this.getListAttribute('secret_permissions');
}
set secretPermissions(value) {
this._secretPermissions = value;
}
resetSecretPermissions() {
this._secretPermissions = undefined;
}
// Temporarily expose input value. Use with caution.
get secretPermissionsInput() {
return this._secretPermissions;
}
get storagePermissions() {
return this.getListAttribute('storage_permissions');
}
set storagePermissions(value) {
this._storagePermissions = value;
}
resetStoragePermissions() {
this._storagePermissions = undefined;
}
// Temporarily expose input value. Use with caution.
get storagePermissionsInput() {
return this._storagePermissions;
}
get tenantId() {
return this.getStringAttribute('tenant_id');
}
set tenantId(value) {
this._tenantId = value;
}
resetTenantId() {
this._tenantId = undefined;
}
// Temporarily expose input value. Use with caution.
get tenantIdInput() {
return this._tenantId;
}
}
exports.KeyVaultAccessPolicyOutputReference = KeyVaultAccessPolicyOutputReference;
_a = JSII_RTTI_SYMBOL_1;
KeyVaultAccessPolicyOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultAccessPolicyOutputReference", version: "12.27.0" };
class KeyVaultAccessPolicyList 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 KeyVaultAccessPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.KeyVaultAccessPolicyList = KeyVaultAccessPolicyList;
_b = JSII_RTTI_SYMBOL_1;
KeyVaultAccessPolicyList[_b] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultAccessPolicyList", version: "12.27.0" };
function keyVaultContactToTerraform(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 {
email: cdktf.stringToTerraform(struct.email),
name: cdktf.stringToTerraform(struct.name),
phone: cdktf.stringToTerraform(struct.phone),
};
}
exports.keyVaultContactToTerraform = keyVaultContactToTerraform;
function keyVaultContactToHclTerraform(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 = {
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
phone: {
value: cdktf.stringToHclTerraform(struct.phone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.keyVaultContactToHclTerraform = keyVaultContactToHclTerraform;
class KeyVaultContactOutputReference 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._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._phone !== undefined) {
hasAnyValues = true;
internalValueResult.phone = this._phone;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._email = undefined;
this._name = undefined;
this._phone = 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._email = value.email;
this._name = value.name;
this._phone = value.phone;
}
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
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 phone() {
return this.getStringAttribute('phone');
}
set phone(value) {
this._phone = value;
}
resetPhone() {
this._phone = undefined;
}
// Temporarily expose input value. Use with caution.
get phoneInput() {
return this._phone;
}
}
exports.KeyVaultContactOutputReference = KeyVaultContactOutputReference;
_c = JSII_RTTI_SYMBOL_1;
KeyVaultContactOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultContactOutputReference", version: "12.27.0" };
class KeyVaultContactList 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 KeyVaultContactOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.KeyVaultContactList = KeyVaultContactList;
_d = JSII_RTTI_SYMBOL_1;
KeyVaultContactList[_d] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultContactList", version: "12.27.0" };
function keyVaultNetworkAclsToTerraform(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 {
bypass: cdktf.stringToTerraform(struct.bypass),
default_action: cdktf.stringToTerraform(struct.defaultAction),
ip_rules: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.ipRules),
virtual_network_subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.virtualNetworkSubnetIds),
};
}
exports.keyVaultNetworkAclsToTerraform = keyVaultNetworkAclsToTerraform;
function keyVaultNetworkAclsToHclTerraform(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 = {
bypass: {
value: cdktf.stringToHclTerraform(struct.bypass),
isBlock: false,
type: "simple",
storageClassType: "string",
},
default_action: {
value: cdktf.stringToHclTerraform(struct.defaultAction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ip_rules: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.ipRules),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
virtual_network_subnet_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.virtualNetworkSubnetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.keyVaultNetworkAclsToHclTerraform = keyVaultNetworkAclsToHclTerraform;
class KeyVaultNetworkAclsOutputReference 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._bypass !== undefined) {
hasAnyValues = true;
internalValueResult.bypass = this._bypass;
}
if (this._defaultAction !== undefined) {
hasAnyValues = true;
internalValueResult.defaultAction = this._defaultAction;
}
if (this._ipRules !== undefined) {
hasAnyValues = true;
internalValueResult.ipRules = this._ipRules;
}
if (this._virtualNetworkSubnetIds !== undefined) {
hasAnyValues = true;
internalValueResult.virtualNetworkSubnetIds = this._virtualNetworkSubnetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bypass = undefined;
this._defaultAction = undefined;
this._ipRules = undefined;
this._virtualNetworkSubnetIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bypass = value.bypass;
this._defaultAction = value.defaultAction;
this._ipRules = value.ipRules;
this._virtualNetworkSubnetIds = value.virtualNetworkSubnetIds;
}
}
get bypass() {
return this.getStringAttribute('bypass');
}
set bypass(value) {
this._bypass = value;
}
// Temporarily expose input value. Use with caution.
get bypassInput() {
return this._bypass;
}
get defaultAction() {
return this.getStringAttribute('default_action');
}
set defaultAction(value) {
this._defaultAction = value;
}
// Temporarily expose input value. Use with caution.
get defaultActionInput() {
return this._defaultAction;
}
get ipRules() {
return cdktf.Fn.tolist(this.getListAttribute('ip_rules'));
}
set ipRules(value) {
this._ipRules = value;
}
resetIpRules() {
this._ipRules = undefined;
}
// Temporarily expose input value. Use with caution.
get ipRulesInput() {
return this._ipRules;
}
get virtualNetworkSubnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('virtual_network_subnet_ids'));
}
set virtualNetworkSubnetIds(value) {
this._virtualNetworkSubnetIds = value;
}
resetVirtualNetworkSubnetIds() {
this._virtualNetworkSubnetIds = undefined;
}
// Temporarily expose input value. Use with caution.
get virtualNetworkSubnetIdsInput() {
return this._virtualNetworkSubnetIds;
}
}
exports.KeyVaultNetworkAclsOutputReference = KeyVaultNetworkAclsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
KeyVaultNetworkAclsOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultNetworkAclsOutputReference", version: "12.27.0" };
function keyVaultTimeoutsToTerraform(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.keyVaultTimeoutsToTerraform = keyVaultTimeoutsToTerraform;
function keyVaultTimeoutsToHclTerraform(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.keyVaultTimeoutsToHclTerraform = keyVaultTimeoutsToHclTerraform;
class KeyVaultTimeoutsOutputReference 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.KeyVaultTimeoutsOutputReference = KeyVaultTimeoutsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
KeyVaultTimeoutsOutputReference[_f] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVaultTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/key_vault azurerm_key_vault}
*/
class KeyVault extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a KeyVault 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 KeyVault to import
* @param importFromId The id of the existing KeyVault that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/key_vault#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the KeyVault to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_key_vault", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/key_vault azurerm_key_vault} 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 KeyVaultConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_key_vault',
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
});
// ==========
// ATTRIBUTES
// ==========
// access_policy - computed: true, optional: true, required: false
this._accessPolicy = new KeyVaultAccessPolicyList(this, "access_policy", false);
// contact - computed: false, optional: true, required: false
this._contact = new KeyVaultContactList(this, "contact", true);
// network_acls - computed: false, optional: true, required: false
this._networkAcls = new KeyVaultNetworkAclsOutputReference(this, "network_acls");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new KeyVaultTimeoutsOutputReference(this, "timeouts");
this._accessPolicy.internalValue = config.accessPolicy;
this._enableRbacAuthorization = config.enableRbacAuthorization;
this._enabledForDeployment = config.enabledForDeployment;
this._enabledForDiskEncryption = config.enabledForDiskEncryption;
this._enabledForTemplateDeployment = config.enabledForTemplateDeployment;
this._id = config.id;
this._location = config.location;
this._name = config.name;
this._publicNetworkAccessEnabled = config.publicNetworkAccessEnabled;
this._purgeProtectionEnabled = config.purgeProtectionEnabled;
this._resourceGroupName = config.resourceGroupName;
this._skuName = config.skuName;
this._softDeleteRetentionDays = config.softDeleteRetentionDays;
this._tags = config.tags;
this._tenantId = config.tenantId;
this._contact.internalValue = config.contact;
this._networkAcls.internalValue = config.networkAcls;
this._timeouts.internalValue = config.timeouts;
}
get accessPolicy() {
return this._accessPolicy;
}
putAccessPolicy(value) {
this._accessPolicy.internalValue = value;
}
resetAccessPolicy() {
this._accessPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get accessPolicyInput() {
return this._accessPolicy.internalValue;
}
get enableRbacAuthorization() {
return this.getBooleanAttribute('enable_rbac_authorization');
}
set enableRbacAuthorization(value) {
this._enableRbacAuthorization = value;
}
resetEnableRbacAuthorization() {
this._enableRbacAuthorization = undefined;
}
// Temporarily expose input value. Use with caution.
get enableRbacAuthorizationInput() {
return this._enableRbacAuthorization;
}
get enabledForDeployment() {
return this.getBooleanAttribute('enabled_for_deployment');
}
set enabledForDeployment(value) {
this._enabledForDeployment = value;
}
resetEnabledForDeployment() {
this._enabledForDeployment = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledForDeploymentInput() {
return this._enabledForDeployment;
}
get enabledForDiskEncryption() {
return this.getBooleanAttribute('enabled_for_disk_encryption');
}
set enabledForDiskEncryption(value) {
this._enabledForDiskEncryption = value;
}
resetEnabledForDiskEncryption() {
this._enabledForDiskEncryption = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledForDiskEncryptionInput() {
return this._enabledForDiskEncryption;
}
get enabledForTemplateDeployment() {
return this.getBooleanAttribute('enabled_for_template_deployment');
}
set enabledForTemplateDeployment(value) {
this._enabledForTemplateDeployment = value;
}
resetEnabledForTemplateDeployment() {
this._enabledForTemplateDeployment = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledForTemplateDeploymentInput() {
return this._enabledForTemplateDeployment;
}
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 publicNetworkAccessEnabled() {
return this.getBooleanAttribute('public_network_access_enabled');
}
set publicNetworkAccessEnabled(value) {
this._publicNetworkAccessEnabled = value;
}
resetPublicNetworkAccessEnabled() {
this._publicNetworkAccessEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get publicNetworkAccessEnabledInput() {
return this._publicNetworkAccessEnabled;
}
get purgeProtectionEnabled() {
return this.getBooleanAttribute('purge_protection_enabled');
}
set purgeProtectionEnabled(value) {
this._purgeProtectionEnabled = value;
}
resetPurgeProtectionEnabled() {
this._purgeProtectionEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get purgeProtectionEnabledInput() {
return this._purgeProtectionEnabled;
}
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 skuName() {
return this.getStringAttribute('sku_name');
}
set skuName(value) {
this._skuName = value;
}
// Temporarily expose input value. Use with caution.
get skuNameInput() {
return this._skuName;
}
get softDeleteRetentionDays() {
return this.getNumberAttribute('soft_delete_retention_days');
}
set softDeleteRetentionDays(value) {
this._softDeleteRetentionDays = value;
}
resetSoftDeleteRetentionDays() {
this._softDeleteRetentionDays = undefined;
}
// Temporarily expose input value. Use with caution.
get softDeleteRetentionDaysInput() {
return this._softDeleteRetentionDays;
}
get tags() {
return this.getStringMapAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get tenantId() {
return this.getStringAttribute('tenant_id');
}
set tenantId(value) {
this._tenantId = value;
}
// Temporarily expose input value. Use with caution.
get tenantIdInput() {
return this._tenantId;
}
// vault_uri - computed: true, optional: false, required: false
get vaultUri() {
return this.getStringAttribute('vault_uri');
}
get contact() {
return this._contact;
}
putContact(value) {
this._contact.internalValue = value;
}
resetContact() {
this._contact.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get contactInput() {
return this._contact.internalValue;
}
get networkAcls() {
return this._networkAcls;
}
putNetworkAcls(value) {
this._networkAcls.internalValue = value;
}
resetNetworkAcls() {
this._networkAcls.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get networkAclsInput() {
return this._networkAcls.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
access_policy: cdktf.listMapper(keyVaultAccessPolicyToTerraform, false)(this._accessPolicy.internalValue),
enable_rbac_authorization: cdktf.booleanToTerraform(this._enableRbacAuthorization),
enabled_for_deployment: cdktf.booleanToTerraform(this._enabledForDeployment),
enabled_for_disk_encryption: cdktf.booleanToTerraform(this._enabledForDiskEncryption),
enabled_for_template_deployment: cdktf.booleanToTerraform(this._enabledForTemplateDeployment),
id: cdktf.stringToTerraform(this._id),
location: cdktf.stringToTerraform(this._location),
name: cdktf.stringToTerraform(this._name),
public_network_access_enabled: cdktf.booleanToTerraform(this._publicNetworkAccessEnabled),
purge_protection_enabled: cdktf.booleanToTerraform(this._purgeProtectionEnabled),
resource_group_name: cdktf.stringToTerraform(this._resourceGroupName),
sku_name: cdktf.stringToTerraform(this._skuName),
soft_delete_retention_days: cdktf.numberToTerraform(this._softDeleteRetentionDays),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tenant_id: cdktf.stringToTerraform(this._tenantId),
contact: cdktf.listMapper(keyVaultContactToTerraform, true)(this._contact.internalValue),
network_acls: keyVaultNetworkAclsToTerraform(this._networkAcls.internalValue),
timeouts: keyVaultTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
access_policy: {
value: cdktf.listMapperHcl(keyVaultAccessPolicyToHclTerraform, false)(this._accessPolicy.internalValue),
isBlock: true,
type: "list",
storageClassType: "KeyVaultAccessPolicyList",
},
enable_rbac_authorization: {
value: cdktf.booleanToHclTerraform(this._enableRbacAuthorization),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enabled_for_deployment: {
value: cdktf.booleanToHclTerraform(this._enabledForDeployment),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enabled_for_disk_encryption: {
value: cdktf.booleanToHclTerraform(this._enabledForDiskEncryption),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enabled_for_template_deployment: {
value: cdktf.booleanToHclTerraform(this._enabledForTemplateDeployment),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
location: {
value: cdktf.stringToHclTerraform(this._location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
public_network_access_enabled: {
value: cdktf.booleanToHclTerraform(this._publicNetworkAccessEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
purge_protection_enabled: {
value: cdktf.booleanToHclTerraform(this._purgeProtectionEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
resource_group_name: {
value: cdktf.stringToHclTerraform(this._resourceGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
sku_name: {
value: cdktf.stringToHclTerraform(this._skuName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
soft_delete_retention_days: {
value: cdktf.numberToHclTerraform(this._softDeleteRetentionDays),
isBlock: false,
type: "simple",
storageClassType: "number",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
tenant_id: {
value: cdktf.stringToHclTerraform(this._tenantId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
contact: {
value: cdktf.listMapperHcl(keyVaultContactToHclTerraform, true)(this._contact.internalValue),
isBlock: true,
type: "set",
storageClassType: "KeyVaultContactList",
},
network_acls: {
value: keyVaultNetworkAclsToHclTerraform(this._networkAcls.internalValue),
isBlock: true,
type: "list",
storageClassType: "KeyVaultNetworkAclsList",
},
timeouts: {
value: keyVaultTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "KeyVaultTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.KeyVault = KeyVault;
_g = JSII_RTTI_SYMBOL_1;
KeyVault[_g] = { fqn: "@cdktf/provider-azurerm.keyVault.KeyVault", version: "12.27.0" };
// =================
// STATIC PROPERTIES
// =================
KeyVault.tfResourceType = "azurerm_key_vault";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5LXZhdWx0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBU0EsK0J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