Azure Network Circuit Authorization
This page shows how to write Terraform and Azure Resource Manager for Network Circuit Authorization and write them securely.
azurerm_express_route_circuit_authorization (Terraform)
The Circuit Authorization in Network can be configured in Terraform with the resource name azurerm_express_route_circuit_authorization
. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "azurerm_express_route_circuit_authorization" "circuitauth" {
name = var.settings.name
express_route_circuit_name = var.express_route_circuit_name
resource_group_name = var.resource_group_name
}
resource "azurerm_express_route_circuit_authorization" "circuitauth" {
name = var.settings.name
express_route_circuit_name = var.express_route_circuit_name
resource_group_name = var.resource_group_name
}
resource "azurerm_express_route_circuit_authorization" "circuitauth" {
name = var.settings.name
express_route_circuit_name = var.express_route_circuit_name
resource_group_name = var.resource_group_name
}
resource "azurerm_express_route_circuit_authorization" "circuitauth" {
name = var.settings.name
express_route_circuit_name = var.express_route_circuit_name
resource_group_name = var.resource_group_name
}
resource "azurerm_express_route_circuit_authorization" "this" {
express_route_circuit_name = var.express_route_circuit_name
name = var.name
resource_group_name = var.resource_group_name
dynamic "timeouts" {
resource "azurerm_express_route_circuit_authorization" "this" {
express_route_circuit_name = var.express_route_circuit_name
name = var.name
resource_group_name = var.resource_group_name
dynamic "timeouts" {
resource "azurerm_express_route_circuit_authorization" "example" {
name = "exampleERCAuth"
express_route_circuit_name = azurerm_express_route_circuit.example.name
resource_group_name = azurerm_resource_group.example.name
}
resource "azurerm_express_route_circuit_authorization" "circuitauth" {
name = var.settings.name
express_route_circuit_name = var.express_route_circuit_name
resource_group_name = var.resource_group_name
}
resource "azurerm_express_route_circuit_authorization" "demo" {
name = "TFDemoExpressRouteAuth"
express_route_circuit_name = azurerm_express_route_circuit.demo.name
resource_group_name = azurerm_resource_group.demo.name
}
resource "azurerm_express_route_circuit_authorization" "express_route_circuit_authorization" {
for_each = var.express_route_circuit_authorizations
express_route_circuit_name = lookup(each.value, "express_route_circuit_name", null)
name = each.key
resource_group_name = lookup(each.value, "resource_group_name", azurerm_resource_group.virtual_wan_resource_group[0].name)
Parameters
-
authorization_key
optional computed - string -
authorization_use_status
optional computed - string -
express_route_circuit_name
required - string -
id
optional computed - string -
name
required - string -
resource_group_name
required - string -
timeouts
single block
Explanation in Terraform Registry
Manages an ExpressRoute Circuit Authorization.
Tips: Best Practices for The Other Azure Network Resources
In addition to the azurerm_network_security_group, Azure Network has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.
azurerm_network_security_group
Ensure to disable RDP port from the Internet
It is better to disable the RDP port from the Internet. RDP access should not be accepted from the Internet (*, 0.0.0.0, /0, internet, any), and consider using the Azure Bastion Service.
azurerm_network_security_rule
Ensure to set a more restrictive CIDR range for ingress from the internet
It is better to set a more restrictive CIDR range not to use very broad subnets. If possible, segments should be divided into smaller subnets.
azurerm_network_watcher_flow_log
Ensure to enable Retention policy for flow logs and set it to enough duration
It is better to enable a retention policy for flow logs. Flow logs show us all network activity in the cloud environment and support us when we face critical incidents.
Microsoft.Network/expressRouteCircuits/authorizations (Azure Resource Manager)
The expressRouteCircuits/authorizations in Microsoft.Network can be configured in Azure Resource Manager with the resource name Microsoft.Network/expressRouteCircuits/authorizations
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
name
required - stringtype
required - stringapiVersion
required - stringproperties
required
Frequently asked questions
What is Azure Network Circuit Authorization?
Azure Network Circuit Authorization is a resource for Network of Microsoft Azure. Settings can be wrote in Terraform.
Where can I find the example code for the Azure Network Circuit Authorization?
For Terraform, the anmoltoppo/Terraform, pkhuntia/aztfmod and davesee/terraform-caf-rover-breakout source code examples are useful. See the Terraform Example section for further details.