This the AVM module that creates a Virtual Network Gateway Connection.
Important
As the overall AVM framework is not GA (generally available) yet - the CI framework and test automation is not fully functional and implemented across all supported languages yet - breaking changes are expected, and additional customer feedback is yet to be gathered and incorporated. Hence, modules MUST NOT be published at version 1.0.0
or higher at this time.
All module MUST be published as a pre-release version (e.g., 0.1.0
, 0.1.1
, 0.2.0
, etc.) until the AVM framework becomes GA.
However, it is important to note that this DOES NOT mean that the modules cannot be consumed and utilized. They CAN be leveraged in all types of environments (dev, test, prod etc.). Consumers can treat them just like any other IaC module and raise issues or feature requests against them as they learn from the usage of the module. Consumers should also read the release notes for each version, if considering updating to a more recent version of a module to see if there are any considerations or breaking changes etc.
The following requirements are needed by this module:
The following resources are used by this module:
- azurerm_management_lock.this (resource)
- azurerm_virtual_network_gateway_connection.this (resource)
- modtm_telemetry.telemetry (resource)
- random_uuid.telemetry (resource)
- azurerm_client_config.telemetry (data source)
- modtm_module_source.telemetry (data source)
The following input variables are required:
Description: Azure region where the resource should be deployed.
Type: string
Description: Connection name
Type: string
Description: The resource group where the resources will be deployed.
Type: string
Description: value of the shared key for both ends of the connection.
Type: string
Description: The type of connection. Must be one of 'Vnet2Vnet', 'ExpressRoute', or 'IPsec'.
Type: string
Description: The ID of the Azure Virtual Network Gateway to connect to.
Type: string
The following input variables are optional (have default values):
Description: The authorization key for the connection. This field is required only if the type is an ExpressRoute
connection
Type: string
Default: null
Description: Possible values are Default, InitiatorOnly and ResponderOnly. Defaults to Default
Type: string
Default: "Default"
Description: Possible values are IKEv1
and IKEv2
. Defaults to IKEv2
. Changing this forces a new resource to be created. -> Note: Only valid for IPSec connections on virtual network gateways with SKU VpnGw1
, VpnGw2
, VpnGw3
, VpnGw1AZ
, VpnGw2AZ
or VpnGw3AZ
.
Type: string
Default: "IKEv2"
Description: Custom APIPA Adresses for BGP
primary
- (Required) - A single IP address that is part of theazurerm_virtual_network_gateway
ip_configuration (first one)secondary
- (Optional) - A single IP address that is part of theazurerm_virtual_network_gateway
ip_configuration (second one). Configure in an Active/Active Gateway setting.
Type:
object({
primary = string
secondary = optional(string, null)
})
Default: null
Description: The dead peer detection timeout of this connection in seconds. Changing this forces a new resource to be created.
Type: string
Default: null
Description: A list of the egress NAT Rule Ids.
Type: list(string)
Default: null
Description: If true, BGP (Border Gateway Protocol) is enabled for this connection. Defaults to false
.
Type: bool
Default: false
Description: This variable controls whether or not telemetry is enabled for the module.
For more information see https://aka.ms/avm/telemetry.
If it is set to false, then no telemetry will be collected.
Type: bool
Default: true
Description: The ID of the Express Route Circuit when creating an ExpressRoute connection (i.e. when type
is ExpressRoute
). The Express Route Circuit can be in the same or in a different subscription. Changing this forces a new resource to be created.
Type: string
Default: null
Description: If true
, data packets will bypass ExpressRoute Gateway for data forwarding This is only valid for ExpressRoute connections
Type: bool
Default: null
Description: A list of the ingress NAT Rule Ids.
Type: list(string)
Default: null
Description: CIDR blocks for traffic selectors
dh_group
- (Required) - The DH group used in IKE phase 1 for initial SA. Valid options areDHGroup1
,DHGroup14
,DHGroup2
,DHGroup2048
,DHGroup24
,ECP256
,ECP384
, orNone
.ike_encryption
- (Required) - The IKE encryption algorithm. Valid options areAES128
,AES192
,AES256
,DES
,DES3
,GCMAES128
, orGCMAES256
.ike_integrity
- (Required) - The IKE integrity algorithm. Valid options areGCMAES128
,GCMAES256
,MD5
,SHA1
,SHA256
, orSHA384
.ipsec_encryption
- (Required) - The IPSec encryption algorithm. Valid options areAES128
,AES192
,AES256
,DES
,DES3
,GCMAES128
,GCMAES192
,GCMAES256
, orNone
.ipsec_integrity
- (Required) - The IPSec integrity algorithm. Valid options areGCMAES128
,GCMAES192
,GCMAES256
,MD5
,SHA1
, orSHA256
.pfs_group
- (Required) - The DH group used in IKE phase 2 for new child SA. Valid options areECP256
,ECP384
,PFS1
,PFS14
,PFS2
,PFS2048
,PFS24
,PFSMM
, orNone
.sa_datasize
- (Optional) - The IPSec SA payload size in KB. Must be at least1024
KB. Defaults to102400000
KB.sa_lifetime
- (Optional) - The IPSec SA lifetime in seconds. Must be at least300
seconds. Defaults to27000
seconds.
Type:
map(object({
dh_group = string
ike_encryption = string
ike_integrity = string
ipsec_encryption = string
ipsec_integrity = string
pfs_group = string
sa_datasize = optional(string)
sa_lifetime = optional(string)
}))
Default: {}
Description: Use private local Azure IP for the connection. Changing this forces a new resource to be created.
Type: bool
Default: null
Description: The ID of the Azure Local Network Gateway to connect to when creating a Site-to-Site connection.
Type: string
Default: null
Description: Controls the Resource Lock configuration for this resource. The following properties can be specified:
kind
- (Required) The type of lock. Possible values are\"CanNotDelete\"
and\"ReadOnly\"
.name
- (Optional) The name of the lock. If not specified, a name will be generated based on thekind
value. Changing this forces the creation of a new resource.
Type:
object({
kind = string
name = optional(string, null)
})
Default: null
Description: Bypass the Express Route gateway when accessing private-links. When enabled express_route_gateway_bypass
must be set to true
. Defaults to false
.
Type: bool
Default: false
Description: The routing weight. Defaults to 10
Type: number
Default: null
Description: (Optional) Tags of the resource.
Type: map(string)
Default: null
Description: CIDR blocks for traffic selectors
local_address_cidrs
- Required - List of local address CIDRs.remote_address_cidrs
- Required - List of Remote Address CIDRs.
Type:
map(object({
local_address_cidrs = list(string)
remote_address_cidrs = list(string)
}))
Default: {}
Description: If true, policy-based traffic selectors are enabled for this connection. Enabling policy-based traffic selectors requires an ipsec_policy block.
Type: bool
Default: null
The following outputs are exported:
Description: n/a
No modules.
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.