Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blackbird-cloud/terraform-azurerm-vnet-peering

Terraform module to create an Azure VNet peering
https://github.com/blackbird-cloud/terraform-azurerm-vnet-peering

azure network terraform

Last synced: 4 days ago
JSON representation

Terraform module to create an Azure VNet peering

Awesome Lists containing this project

README

        

# Terraform Azurerm Vnet Peering Module
Terraform module to create an Azure VNet peering

[![blackbird-logo](https://raw.githubusercontent.com/blackbird-cloud/terraform-module-template/main/.config/logo_simple.png)](https://blackbird.cloud)

## Example
```hcl
module "vnet_peering" {
source = "../"

network_peerings = {
non-prod-to-shared = {
origin_resource_group_name = "non-prod-rg"
origin_virtual_network_name = "non-prod-vnet-name"
remote_virtual_network_id = "shared-vnet-id"
}
prod-to-shared = {
origin_resource_group_name = "prod-rg"
origin_virtual_network_name = "prod-vnet-name"
remote_virtual_network_id = "shared-vnet-id"
}
shared-to-non-prod = {
origin_resource_group_name = "shared-rg"
origin_virtual_network_name = "shared-vnet-name"
remote_virtual_network_id = "non-prod-vnet-id"
}
shared-to-prod = {
origin_resource_group_name = "shared-rg"
origin_virtual_network_name = "shared-vnet-name"
remote_virtual_network_id = "prod-vnet-id"
}
}
}
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.2 |
| [azurerm](#requirement\_azurerm) | ~> 3 |

## Providers

| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | ~> 3 |

## Resources

| Name | Type |
|------|------|
| [azurerm_virtual_network_peering.default](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network_peering) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allow\_forwarded\_traffic](#input\_allow\_forwarded\_traffic) | Controls if forwarded traffic from the VMs in the peered virtual network is allowed. | `bool` | `false` | no |
| [allow\_virtual\_network\_access](#input\_allow\_virtual\_network\_access) | Controls if the VMs in the peered virtual network are allowed to access the VMs in the local virtual network. | `bool` | `true` | no |
| [network\_peerings](#input\_network\_peerings) | A map of network peerings to create. |

map(object({
origin_resource_group_name = string
origin_virtual_network_name = string
remote_virtual_network_id = string
origin_is_gateway = bool
}))
| `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [peering\_network\_ids](#output\_peering\_network\_ids) | The IDs of the network peerings. |

## About

We are [Blackbird Cloud](https://blackbird.cloud), Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.

Checkout our other :point\_right: [terraform modules](https://registry.terraform.io/namespaces/blackbird-cloud)

## Copyright

Copyright © 2017-2024 [Blackbird Cloud](https://blackbird.cloud)