@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,240 lines • 183 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualNetworkGatewayConnection = exports.VirtualNetworkGatewayConnectionTrafficSelectorPolicyList = exports.VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference = exports.virtualNetworkGatewayConnectionTrafficSelectorPolicyToHclTerraform = exports.virtualNetworkGatewayConnectionTrafficSelectorPolicyToTerraform = exports.VirtualNetworkGatewayConnectionTimeoutsOutputReference = exports.virtualNetworkGatewayConnectionTimeoutsToHclTerraform = exports.virtualNetworkGatewayConnectionTimeoutsToTerraform = exports.VirtualNetworkGatewayConnectionIpsecPolicyOutputReference = exports.virtualNetworkGatewayConnectionIpsecPolicyToHclTerraform = exports.virtualNetworkGatewayConnectionIpsecPolicyToTerraform = exports.VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference = exports.virtualNetworkGatewayConnectionCustomBgpAddressesToHclTerraform = exports.virtualNetworkGatewayConnectionCustomBgpAddressesToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function virtualNetworkGatewayConnectionCustomBgpAddressesToTerraform(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 {
primary: cdktf.stringToTerraform(struct.primary),
secondary: cdktf.stringToTerraform(struct.secondary),
};
}
exports.virtualNetworkGatewayConnectionCustomBgpAddressesToTerraform = virtualNetworkGatewayConnectionCustomBgpAddressesToTerraform;
function virtualNetworkGatewayConnectionCustomBgpAddressesToHclTerraform(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 = {
primary: {
value: cdktf.stringToHclTerraform(struct.primary),
isBlock: false,
type: "simple",
storageClassType: "string",
},
secondary: {
value: cdktf.stringToHclTerraform(struct.secondary),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.virtualNetworkGatewayConnectionCustomBgpAddressesToHclTerraform = virtualNetworkGatewayConnectionCustomBgpAddressesToHclTerraform;
class VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference 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._primary !== undefined) {
hasAnyValues = true;
internalValueResult.primary = this._primary;
}
if (this._secondary !== undefined) {
hasAnyValues = true;
internalValueResult.secondary = this._secondary;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._primary = undefined;
this._secondary = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._primary = value.primary;
this._secondary = value.secondary;
}
}
get primary() {
return this.getStringAttribute('primary');
}
set primary(value) {
this._primary = value;
}
// Temporarily expose input value. Use with caution.
get primaryInput() {
return this._primary;
}
get secondary() {
return this.getStringAttribute('secondary');
}
set secondary(value) {
this._secondary = value;
}
resetSecondary() {
this._secondary = undefined;
}
// Temporarily expose input value. Use with caution.
get secondaryInput() {
return this._secondary;
}
}
exports.VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference = VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference", version: "12.27.0" };
function virtualNetworkGatewayConnectionIpsecPolicyToTerraform(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 {
dh_group: cdktf.stringToTerraform(struct.dhGroup),
ike_encryption: cdktf.stringToTerraform(struct.ikeEncryption),
ike_integrity: cdktf.stringToTerraform(struct.ikeIntegrity),
ipsec_encryption: cdktf.stringToTerraform(struct.ipsecEncryption),
ipsec_integrity: cdktf.stringToTerraform(struct.ipsecIntegrity),
pfs_group: cdktf.stringToTerraform(struct.pfsGroup),
sa_datasize: cdktf.numberToTerraform(struct.saDatasize),
sa_lifetime: cdktf.numberToTerraform(struct.saLifetime),
};
}
exports.virtualNetworkGatewayConnectionIpsecPolicyToTerraform = virtualNetworkGatewayConnectionIpsecPolicyToTerraform;
function virtualNetworkGatewayConnectionIpsecPolicyToHclTerraform(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 = {
dh_group: {
value: cdktf.stringToHclTerraform(struct.dhGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ike_encryption: {
value: cdktf.stringToHclTerraform(struct.ikeEncryption),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ike_integrity: {
value: cdktf.stringToHclTerraform(struct.ikeIntegrity),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ipsec_encryption: {
value: cdktf.stringToHclTerraform(struct.ipsecEncryption),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ipsec_integrity: {
value: cdktf.stringToHclTerraform(struct.ipsecIntegrity),
isBlock: false,
type: "simple",
storageClassType: "string",
},
pfs_group: {
value: cdktf.stringToHclTerraform(struct.pfsGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
sa_datasize: {
value: cdktf.numberToHclTerraform(struct.saDatasize),
isBlock: false,
type: "simple",
storageClassType: "number",
},
sa_lifetime: {
value: cdktf.numberToHclTerraform(struct.saLifetime),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.virtualNetworkGatewayConnectionIpsecPolicyToHclTerraform = virtualNetworkGatewayConnectionIpsecPolicyToHclTerraform;
class VirtualNetworkGatewayConnectionIpsecPolicyOutputReference 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._dhGroup !== undefined) {
hasAnyValues = true;
internalValueResult.dhGroup = this._dhGroup;
}
if (this._ikeEncryption !== undefined) {
hasAnyValues = true;
internalValueResult.ikeEncryption = this._ikeEncryption;
}
if (this._ikeIntegrity !== undefined) {
hasAnyValues = true;
internalValueResult.ikeIntegrity = this._ikeIntegrity;
}
if (this._ipsecEncryption !== undefined) {
hasAnyValues = true;
internalValueResult.ipsecEncryption = this._ipsecEncryption;
}
if (this._ipsecIntegrity !== undefined) {
hasAnyValues = true;
internalValueResult.ipsecIntegrity = this._ipsecIntegrity;
}
if (this._pfsGroup !== undefined) {
hasAnyValues = true;
internalValueResult.pfsGroup = this._pfsGroup;
}
if (this._saDatasize !== undefined) {
hasAnyValues = true;
internalValueResult.saDatasize = this._saDatasize;
}
if (this._saLifetime !== undefined) {
hasAnyValues = true;
internalValueResult.saLifetime = this._saLifetime;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dhGroup = undefined;
this._ikeEncryption = undefined;
this._ikeIntegrity = undefined;
this._ipsecEncryption = undefined;
this._ipsecIntegrity = undefined;
this._pfsGroup = undefined;
this._saDatasize = undefined;
this._saLifetime = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dhGroup = value.dhGroup;
this._ikeEncryption = value.ikeEncryption;
this._ikeIntegrity = value.ikeIntegrity;
this._ipsecEncryption = value.ipsecEncryption;
this._ipsecIntegrity = value.ipsecIntegrity;
this._pfsGroup = value.pfsGroup;
this._saDatasize = value.saDatasize;
this._saLifetime = value.saLifetime;
}
}
get dhGroup() {
return this.getStringAttribute('dh_group');
}
set dhGroup(value) {
this._dhGroup = value;
}
// Temporarily expose input value. Use with caution.
get dhGroupInput() {
return this._dhGroup;
}
get ikeEncryption() {
return this.getStringAttribute('ike_encryption');
}
set ikeEncryption(value) {
this._ikeEncryption = value;
}
// Temporarily expose input value. Use with caution.
get ikeEncryptionInput() {
return this._ikeEncryption;
}
get ikeIntegrity() {
return this.getStringAttribute('ike_integrity');
}
set ikeIntegrity(value) {
this._ikeIntegrity = value;
}
// Temporarily expose input value. Use with caution.
get ikeIntegrityInput() {
return this._ikeIntegrity;
}
get ipsecEncryption() {
return this.getStringAttribute('ipsec_encryption');
}
set ipsecEncryption(value) {
this._ipsecEncryption = value;
}
// Temporarily expose input value. Use with caution.
get ipsecEncryptionInput() {
return this._ipsecEncryption;
}
get ipsecIntegrity() {
return this.getStringAttribute('ipsec_integrity');
}
set ipsecIntegrity(value) {
this._ipsecIntegrity = value;
}
// Temporarily expose input value. Use with caution.
get ipsecIntegrityInput() {
return this._ipsecIntegrity;
}
get pfsGroup() {
return this.getStringAttribute('pfs_group');
}
set pfsGroup(value) {
this._pfsGroup = value;
}
// Temporarily expose input value. Use with caution.
get pfsGroupInput() {
return this._pfsGroup;
}
get saDatasize() {
return this.getNumberAttribute('sa_datasize');
}
set saDatasize(value) {
this._saDatasize = value;
}
resetSaDatasize() {
this._saDatasize = undefined;
}
// Temporarily expose input value. Use with caution.
get saDatasizeInput() {
return this._saDatasize;
}
get saLifetime() {
return this.getNumberAttribute('sa_lifetime');
}
set saLifetime(value) {
this._saLifetime = value;
}
resetSaLifetime() {
this._saLifetime = undefined;
}
// Temporarily expose input value. Use with caution.
get saLifetimeInput() {
return this._saLifetime;
}
}
exports.VirtualNetworkGatewayConnectionIpsecPolicyOutputReference = VirtualNetworkGatewayConnectionIpsecPolicyOutputReference;
_b = JSII_RTTI_SYMBOL_1;
VirtualNetworkGatewayConnectionIpsecPolicyOutputReference[_b] = { fqn: "@cdktf/provider-azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnectionIpsecPolicyOutputReference", version: "12.27.0" };
function virtualNetworkGatewayConnectionTimeoutsToTerraform(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.virtualNetworkGatewayConnectionTimeoutsToTerraform = virtualNetworkGatewayConnectionTimeoutsToTerraform;
function virtualNetworkGatewayConnectionTimeoutsToHclTerraform(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.virtualNetworkGatewayConnectionTimeoutsToHclTerraform = virtualNetworkGatewayConnectionTimeoutsToHclTerraform;
class VirtualNetworkGatewayConnectionTimeoutsOutputReference 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.VirtualNetworkGatewayConnectionTimeoutsOutputReference = VirtualNetworkGatewayConnectionTimeoutsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
VirtualNetworkGatewayConnectionTimeoutsOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnectionTimeoutsOutputReference", version: "12.27.0" };
function virtualNetworkGatewayConnectionTrafficSelectorPolicyToTerraform(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 {
local_address_cidrs: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.localAddressCidrs),
remote_address_cidrs: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.remoteAddressCidrs),
};
}
exports.virtualNetworkGatewayConnectionTrafficSelectorPolicyToTerraform = virtualNetworkGatewayConnectionTrafficSelectorPolicyToTerraform;
function virtualNetworkGatewayConnectionTrafficSelectorPolicyToHclTerraform(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 = {
local_address_cidrs: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.localAddressCidrs),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
remote_address_cidrs: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.remoteAddressCidrs),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.virtualNetworkGatewayConnectionTrafficSelectorPolicyToHclTerraform = virtualNetworkGatewayConnectionTrafficSelectorPolicyToHclTerraform;
class VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference 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._localAddressCidrs !== undefined) {
hasAnyValues = true;
internalValueResult.localAddressCidrs = this._localAddressCidrs;
}
if (this._remoteAddressCidrs !== undefined) {
hasAnyValues = true;
internalValueResult.remoteAddressCidrs = this._remoteAddressCidrs;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._localAddressCidrs = undefined;
this._remoteAddressCidrs = 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._localAddressCidrs = value.localAddressCidrs;
this._remoteAddressCidrs = value.remoteAddressCidrs;
}
}
get localAddressCidrs() {
return this.getListAttribute('local_address_cidrs');
}
set localAddressCidrs(value) {
this._localAddressCidrs = value;
}
// Temporarily expose input value. Use with caution.
get localAddressCidrsInput() {
return this._localAddressCidrs;
}
get remoteAddressCidrs() {
return this.getListAttribute('remote_address_cidrs');
}
set remoteAddressCidrs(value) {
this._remoteAddressCidrs = value;
}
// Temporarily expose input value. Use with caution.
get remoteAddressCidrsInput() {
return this._remoteAddressCidrs;
}
}
exports.VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference = VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference;
_d = JSII_RTTI_SYMBOL_1;
VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference", version: "12.27.0" };
class VirtualNetworkGatewayConnectionTrafficSelectorPolicyList 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 VirtualNetworkGatewayConnectionTrafficSelectorPolicyOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.VirtualNetworkGatewayConnectionTrafficSelectorPolicyList = VirtualNetworkGatewayConnectionTrafficSelectorPolicyList;
_e = JSII_RTTI_SYMBOL_1;
VirtualNetworkGatewayConnectionTrafficSelectorPolicyList[_e] = { fqn: "@cdktf/provider-azurerm.virtualNetworkGatewayConnection.VirtualNetworkGatewayConnectionTrafficSelectorPolicyList", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/virtual_network_gateway_connection azurerm_virtual_network_gateway_connection}
*/
class VirtualNetworkGatewayConnection extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a VirtualNetworkGatewayConnection 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 VirtualNetworkGatewayConnection to import
* @param importFromId The id of the existing VirtualNetworkGatewayConnection that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/virtual_network_gateway_connection#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the VirtualNetworkGatewayConnection to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_virtual_network_gateway_connection", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/virtual_network_gateway_connection azurerm_virtual_network_gateway_connection} 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 VirtualNetworkGatewayConnectionConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_virtual_network_gateway_connection',
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
});
// custom_bgp_addresses - computed: false, optional: true, required: false
this._customBgpAddresses = new VirtualNetworkGatewayConnectionCustomBgpAddressesOutputReference(this, "custom_bgp_addresses");
// ipsec_policy - computed: false, optional: true, required: false
this._ipsecPolicy = new VirtualNetworkGatewayConnectionIpsecPolicyOutputReference(this, "ipsec_policy");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new VirtualNetworkGatewayConnectionTimeoutsOutputReference(this, "timeouts");
// traffic_selector_policy - computed: false, optional: true, required: false
this._trafficSelectorPolicy = new VirtualNetworkGatewayConnectionTrafficSelectorPolicyList(this, "traffic_selector_policy", false);
this._authorizationKey = config.authorizationKey;
this._connectionMode = config.connectionMode;
this._connectionProtocol = config.connectionProtocol;
this._dpdTimeoutSeconds = config.dpdTimeoutSeconds;
this._egressNatRuleIds = config.egressNatRuleIds;
this._enableBgp = config.enableBgp;
this._expressRouteCircuitId = config.expressRouteCircuitId;
this._expressRouteGatewayBypass = config.expressRouteGatewayBypass;
this._id = config.id;
this._ingressNatRuleIds = config.ingressNatRuleIds;
this._localAzureIpAddressEnabled = config.localAzureIpAddressEnabled;
this._localNetworkGatewayId = config.localNetworkGatewayId;
this._location = config.location;
this._name = config.name;
this._peerVirtualNetworkGatewayId = config.peerVirtualNetworkGatewayId;
this._privateLinkFastPathEnabled = config.privateLinkFastPathEnabled;
this._resourceGroupName = config.resourceGroupName;
this._routingWeight = config.routingWeight;
this._sharedKey = config.sharedKey;
this._tags = config.tags;
this._type = config.type;
this._usePolicyBasedTrafficSelectors = config.usePolicyBasedTrafficSelectors;
this._virtualNetworkGatewayId = config.virtualNetworkGatewayId;
this._customBgpAddresses.internalValue = config.customBgpAddresses;
this._ipsecPolicy.internalValue = config.ipsecPolicy;
this._timeouts.internalValue = config.timeouts;
this._trafficSelectorPolicy.internalValue = config.trafficSelectorPolicy;
}
get authorizationKey() {
return this.getStringAttribute('authorization_key');
}
set authorizationKey(value) {
this._authorizationKey = value;
}
resetAuthorizationKey() {
this._authorizationKey = undefined;
}
// Temporarily expose input value. Use with caution.
get authorizationKeyInput() {
return this._authorizationKey;
}
get connectionMode() {
return this.getStringAttribute('connection_mode');
}
set connectionMode(value) {
this._connectionMode = value;
}
resetConnectionMode() {
this._connectionMode = undefined;
}
// Temporarily expose input value. Use with caution.
get connectionModeInput() {
return this._connectionMode;
}
get connectionProtocol() {
return this.getStringAttribute('connection_protocol');
}
set connectionProtocol(value) {
this._connectionProtocol = value;
}
resetConnectionProtocol() {
this._connectionProtocol = undefined;
}
// Temporarily expose input value. Use with caution.
get connectionProtocolInput() {
return this._connectionProtocol;
}
get dpdTimeoutSeconds() {
return this.getNumberAttribute('dpd_timeout_seconds');
}
set dpdTimeoutSeconds(value) {
this._dpdTimeoutSeconds = value;
}
resetDpdTimeoutSeconds() {
this._dpdTimeoutSeconds = undefined;
}
// Temporarily expose input value. Use with caution.
get dpdTimeoutSecondsInput() {
return this._dpdTimeoutSeconds;
}
get egressNatRuleIds() {
return cdktf.Fn.tolist(this.getListAttribute('egress_nat_rule_ids'));
}
set egressNatRuleIds(value) {
this._egressNatRuleIds = value;
}
resetEgressNatRuleIds() {
this._egressNatRuleIds = undefined;
}
// Temporarily expose input value. Use with caution.
get egressNatRuleIdsInput() {
return this._egressNatRuleIds;
}
get enableBgp() {
return this.getBooleanAttribute('enable_bgp');
}
set enableBgp(value) {
this._enableBgp = value;
}
resetEnableBgp() {
this._enableBgp = undefined;
}
// Temporarily expose input value. Use with caution.
get enableBgpInput() {
return this._enableBgp;
}
get expressRouteCircuitId() {
return this.getStringAttribute('express_route_circuit_id');
}
set expressRouteCircuitId(value) {
this._expressRouteCircuitId = value;
}
resetExpressRouteCircuitId() {
this._expressRouteCircuitId = undefined;
}
// Temporarily expose input value. Use with caution.
get expressRouteCircuitIdInput() {
return this._expressRouteCircuitId;
}
get expressRouteGatewayBypass() {
return this.getBooleanAttribute('express_route_gateway_bypass');
}
set expressRouteGatewayBypass(value) {
this._expressRouteGatewayBypass = value;
}
resetExpressRouteGatewayBypass() {
this._expressRouteGatewayBypass = undefined;
}
// Temporarily expose input value. Use with caution.
get expressRouteGatewayBypassInput() {
return this._expressRouteGatewayBypass;
}
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 ingressNatRuleIds() {
return cdktf.Fn.tolist(this.getListAttribute('ingress_nat_rule_ids'));
}
set ingressNatRuleIds(value) {
this._ingressNatRuleIds = value;
}
resetIngressNatRuleIds() {
this._ingressNatRuleIds = undefined;
}
// Temporarily expose input value. Use with caution.
get ingressNatRuleIdsInput() {
return this._ingressNatRuleIds;
}
get localAzureIpAddressEnabled() {
return this.getBooleanAttribute('local_azure_ip_address_enabled');
}
set localAzureIpAddressEnabled(value) {
this._localAzureIpAddressEnabled = value;
}
resetLocalAzureIpAddressEnabled() {
this._localAzureIpAddressEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get localAzureIpAddressEnabledInput() {
return this._localAzureIpAddressEnabled;
}
get localNetworkGatewayId() {
return this.getStringAttribute('local_network_gateway_id');
}
set localNetworkGatewayId(value) {
this._localNetworkGatewayId = value;
}
resetLocalNetworkGatewayId() {
this._localNetworkGatewayId = undefined;
}
// Temporarily expose input value. Use with caution.
get localNetworkGatewayIdInput() {
return this._localNetworkGatewayId;
}
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 peerVirtualNetworkGatewayId() {
return this.getStringAttribute('peer_virtual_network_gateway_id');
}
set peerVirtualNetworkGatewayId(value) {
this._peerVirtualNetworkGatewayId = value;
}
resetPeerVirtualNetworkGatewayId() {
this._peerVirtualNetworkGatewayId = undefined;
}
// Temporarily expose input value. Use with caution.
get peerVirtualNetworkGatewayIdInput() {
return this._peerVirtualNetworkGatewayId;
}
get privateLinkFastPathEnabled() {
return this.getBooleanAttribute('private_link_fast_path_enabled');
}
set privateLinkFastPathEnabled(value) {
this._privateLinkFastPathEnabled = value;
}
resetPrivateLinkFastPathEnabled() {
this._privateLinkFastPathEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get privateLinkFastPathEnabledInput() {
return this._privateLinkFastPathEnabled;
}
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 routingWeight() {
return this.getNumberAttribute('routing_weight');
}
set routingWeight(value) {
this._routingWeight = value;
}
resetRoutingWeight() {
this._routingWeight = undefined;
}
// Temporarily expose input value. Use with caution.
get routingWeightInput() {
return this._routingWeight;
}
get sharedKey() {
return this.getStringAttribute('shared_key');
}
set sharedKey(value) {
this._sharedKey = value;
}
resetSharedKey() {
this._sharedKey = undefined;
}
// Temporarily expose input value. Use with caution.
get sharedKeyInput() {
return this._sharedKey;
}
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 type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get usePolicyBasedTrafficSelectors() {
return this.getBooleanAttribute('use_policy_based_traffic_selectors');
}
set usePolicyBasedTrafficSelectors(value) {
this._usePolicyBasedTrafficSelectors = value;
}
resetUsePolicyBasedTrafficSelectors() {
this._usePolicyBasedTrafficSelectors = undefined;
}
// Temporarily expose input value. Use with caution.
get usePolicyBasedTrafficSelectorsInput() {
return this._usePolicyBasedTrafficSelectors;
}
get virtualNetworkGatewayId() {
return this.getStringAttribute('virtual_network_gateway_id');
}
set virtualNetworkGatewayId(value) {
this._virtualNetworkGatewayId = value;
}
// Temporarily expose input value. Use with caution.
get virtualNetworkGatewayIdInput() {
return this._virtualNetworkGatewayId;
}
get customBgpAddresses() {
return this._customBgpAddresses;
}
putCustomBgpAddresses(value) {
this._customBgpAddresses.internalValue = value;
}
resetCustomBgpAddresses() {
this._customBgpAddresses.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customBgpAddressesInput() {
return this._customBgpAddresses.internalValue;
}
get ipsecPolicy() {
return this._ipsecPolicy;
}
putIpsecPolicy(value) {
this._ipsecPolicy.internalValue = value;
}
resetIpsecPolicy() {
this._ipsecPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get ipsecPolicyInput() {
return this._ipsecPolicy.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;
}
get trafficSelectorPolicy() {
return this._trafficSelectorPolicy;
}
putTrafficSelectorPolicy(value) {
this._trafficSelectorPolicy.internalValue = value;
}
resetTrafficSelectorPolicy() {
this._trafficSelectorPolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get trafficSelectorPolicyInput() {
return this._trafficSelectorPolicy.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
authorization_key: cdktf.stringToTerraform(this._authorizationKey),
connection_mode: cdktf.stringToTerraform(this._connectionMode),
connection_protocol: cdktf.stringToTerraform(this._connectionProtocol),
dpd_timeout_seconds: cdktf.numberToTerraform(this._dpdTimeoutSeconds),
egress_nat_rule_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._egressNatRuleIds),
enable_bgp: cdktf.booleanToTerraform(this._enableBgp),
express_route_circuit_id: cdktf.stringToTerraform(this._expressRouteCircuitId),
express_route_gateway_bypass: cdktf.booleanToTerraform(this._expressRouteGatewayBypass),
id: cdktf.stringToTerraform(this._id),
ingress_nat_rule_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._ingressNatRuleIds),
local_azure_ip_address_enabled: cdktf.booleanToTerraform(this._localAzureIpAddressEnabled),
local_network_gateway_id: cdktf.stringToTerraform(this._localNetworkGatewayId),
location: cdktf.stringToTerraform(this._location),
name: cdktf.stringToTerraform(this._name),
peer_virtual_network_gateway_id: cdktf.stringToTerraform(this._peerVirtualNetworkGatewayId),
private_link_fast_path_enabled: cdktf.booleanToTerraform(this._privateLinkFastPathEnabled),
resource_group_name: cdktf.stringToTerraform(this._resourceGroupName),
routing_weight: cdktf.numberToTerraform(this._routingWeight),
shared_key: cdktf.stringToTerraform(this._sharedKey),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
type: cdktf.stringToTerraform(this._type),
use_policy_based_traffic_selectors: cdktf.booleanToTerraform(this._usePolicyBasedTrafficSelectors),
virtual_network_gateway_id: cdktf.stringToTerraform(this._virtualNetworkGatewayId),
custom_bgp_addresses: virtualNetworkGatewayConnectionCustomBgpAddressesToTerraform(this._customBgpAddresses.internalValue),
ipsec_policy: virtualNetworkGatewayConnectionIpsecPolicyToTerraform(this._ipsecPolicy.internalValue),
timeouts: virtualNetworkGatewayConnectionTimeoutsToTerraform(this._timeouts.internalValue),
traffic_selector_policy: cdktf.listMapper(virtualNetworkGatewayConnectionTrafficSelectorPolicyToTerraform, true)(this._trafficSelectorPolicy.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
authorization_key: {
value: cdktf.stringToHclTerraform(this._authorizationKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
connection_mode: {
value: cdktf.stringToHclTerraform(this._connectionMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
connection_protocol: {
value: cdktf.stringToHclTerraform(this._connectionProtocol),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dpd_timeout_seconds: {
value: cdktf.numberToHclTerraform(this._dpdTimeoutSeconds),
isBlock: false,
type: "simple",
storageClassType: "number",
},
egress_nat_rule_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._egressNatRuleIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
enable_bgp: {
value: cdktf.booleanToHclTerraform(this._enableBgp),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
express_route_circuit_id: {
value: cdktf.stringToHclTerraform(this._expressRouteCircuitId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
express_route_gateway_bypass: {
value: cdktf.booleanToHclTerraform(this._expressRouteGatewayBypass),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ingress_nat_rule_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._ingressNatRuleIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
local_azure_ip_address_enabled: {
value: cdktf.booleanToHclTerraform(this._localAzureIpAddressEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
local_network_gateway_id: {
value: cdktf.stringToHclTerraform(this._localNetworkGatewayId),
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",
},
peer_virtual_network_gateway_id: {
value: cdktf.stringToHclTerraform(this._peerVirtualNetworkGatewayId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
private_link_fast_path_enabled: {
value: cdktf.booleanToHclTerraform(this._privateLinkFastPathEnabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
resource_group_name: {
value: cdktf.stringToHclTerraform(this._resourceGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
routing_weight: {
value: cdktf.numberToHclTerraform(this._routingWeight),
isBlock: false,
type: "simple",
storageClassType: "number",
},
shared_key: {
value: cdktf.stringToHclTerraform(this._sharedKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tags: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
type: {
value: cdktf.stringToHclTerraform(this._type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
use_policy_based_traffic_selectors: {
value: cdktf.booleanToHclTerraform(this._usePolicyBasedTrafficSelectors),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
virtual_network_gateway_id: {
value: cdktf.stringToHclTerraform(this._virtualNetworkGatewayId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_bgp_addresses: {
value: virtualNetworkGatewayConnectionCustomBgpAddressesToHclTerraform(this._customBgpAddresses.internalValue),
isBlock: true,
type: "list",
storageClassType: "VirtualNetworkGatewayConnectionCustomBgpAddressesList",
},
ipsec_policy: {
value: virtualNetworkGatewayConnectionIpsecPolicyToHclTerraform(this._ipsecPolicy.internalValue),
isBlock: true,
type: "list",
storageClassType: "VirtualNetworkGatewayConnectionIpsecPolicyList",
},
timeouts: {
value: virtualNetworkGa