-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from sironite/task/firstrelease
BREAKING CHANGE: - Module release
- Loading branch information
Showing
13 changed files
with
266 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
## Connection for a Virtual Hub | ||
[![Changelog](https://img.shields.io/badge/changelog-release-green.svg)](https://github.com/sironite/terraform-azurerm-virtual_hub_connection/releases/latest) [![Notice](https://img.shields.io/badge/notice-copyright-yellow.svg)](NOTICE) [![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-orange.svg)](LICENSE) [![TF Registry](https://img.shields.io/badge/terraform-registry-blue.svg)](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub_connection) | ||
|
||
# Usage - Module | ||
|
||
##Connection for a Virtual Hub | ||
|
||
```hcl | ||
module "virtual_hub_connection" { | ||
source = "sironite/virtual_hub_connection/azurerm" | ||
version = "x.x.x" | ||
name = "example-vhub" | ||
virtual_hub_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualHubs/example-vhub" | ||
remote_virtual_network_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualNetworks/example-vnet" | ||
internet_security_enabled = true | ||
} | ||
``` | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| azurerm | >=2.0.0 | | ||
|
||
## Modules | ||
|
||
No modules. | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [azurerm_virtual_hub_connection.this](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub_connection) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Required | | ||
|------|-------------|------|:--------:| | ||
| remote\_virtual\_network\_id | The ID of the remote virtual network. | `string` | yes | | ||
| virtual\_hub\_connection\_name | The name of the virtual hub connection. | `string` | yes | | ||
| virtual\_hub\_id | The ID of the virtual hub. | `string` | yes | | ||
| address\_prefixes | The address prefixes for the static VNet route. | `list(string)` | no | | ||
| associated\_route\_table\_id | The ID of the associated route table. | `string` | no | | ||
| internet\_security\_enabled | Whether or not internet security is enabled. | `bool` | no | | ||
| labels | The labels for the propagated route table. | `list(string)` | no | | ||
| next\_hop\_type | The next hop type for the static VNet route. | `string` | no | | ||
| route\_table\_ids | The IDs of the propagated route tables. | `list(string)` | no | | ||
| static\_vnet\_route\_name | The name of the static VNet route. | `string` | no | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| virtual\_hub\_connection\_id | The ID of the virtual hub connection. | | ||
| virtual\_hub\_connection\_name | The name of the virtual hub connection. | | ||
|
||
## Related documentation | ||
<!-- END_TF_DOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Terraform module | AzureRM - Connection for a Virtual Hub | ||
|
||
This Terraform module is designed to create a Connection for a Virtual Hub for Azure. | ||
|
||
## Pre-requisites | ||
|
||
Using the modules requires the following pre-requisites: | ||
* Active Azure account and subscription | ||
|
||
## Usage | ||
|
||
`azurerm_virtual_hub_connection` | ||
|
||
```hcl | ||
module "virtual_hub_connection" { | ||
source = "sironite/virtual_hub_connection/azurerm" | ||
version = "x.x.x" | ||
name = "example-vhub" | ||
virtual_hub_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualHubs/example-vhub" | ||
remote_virtual_network_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualNetworks/example-vnet" | ||
internet_security_enabled = true | ||
} | ||
``` | ||
|
||
## Authors | ||
|
||
The module is maintained by [Sironite](https://github.com/sironite) | ||
|
||
## Documentation | ||
|
||
> product: https://azure.microsoft.com/en-us/ | ||
> | ||
> Provider: https://registry.terraform.io/providers/hashicorp/azurerm/latest | ||
> | ||
> Documentation: https://learn.microsoft.com/en-us/azure/?product=popular |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module "virtual_hub_connection" { | ||
source = "sironite/virtual_hub_connection/azurerm" | ||
version = "x.x.x" | ||
|
||
name = "example-vhub" | ||
virtual_hub_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualHubs/example-vhub" | ||
remote_virtual_network_id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.Network/virtualNetworks/example-vnet" | ||
internet_security_enabled = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
variable "virtual_hub_connection_name" { | ||
type = string | ||
description = "The name of the virtual hub connection." | ||
} | ||
|
||
variable "virtual_hub_id" { | ||
type = string | ||
description = "The ID of the virtual hub." | ||
} | ||
|
||
variable "remote_virtual_network_id" { | ||
type = string | ||
description = "The ID of the remote virtual network." | ||
} | ||
|
||
variable "internet_security_enabled" { | ||
type = bool | ||
description = "Whether or not internet security is enabled." | ||
default = true | ||
} | ||
|
||
variable "associated_route_table_id" { | ||
type = string | ||
description = "The ID of the associated route table." | ||
default = null | ||
} | ||
|
||
variable "labels" { | ||
type = list(string) | ||
description = "The labels for the propagated route table." | ||
default = [] | ||
} | ||
|
||
variable "route_table_ids" { | ||
type = list(string) | ||
description = "The IDs of the propagated route tables." | ||
default = [] | ||
} | ||
|
||
variable "static_vnet_route_name" { | ||
type = string | ||
description = "The name of the static VNet route." | ||
default = null | ||
} | ||
|
||
variable "address_prefixes" { | ||
type = list(string) | ||
description = "The address prefixes for the static VNet route." | ||
default = [] | ||
} | ||
|
||
variable "next_hop_type" { | ||
type = string | ||
description = "The next hop type for the static VNet route." | ||
default = null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
resource "azurerm_virtual_hub_connection" "this" { | ||
name = var.virtual_hub_connection_name | ||
virtual_hub_id = var.virtual_hub_id | ||
remote_virtual_network_id = var.remote_virtual_network_id | ||
internet_security_enabled = var.internet_security_enabled | ||
|
||
routing { | ||
associated_route_table_id = var.associated_route_table_id | ||
propagated_route_table { | ||
labels = var.labels | ||
route_table_ids = var.route_table_ids | ||
} | ||
|
||
static_vnet_route { | ||
name = var.static_vnet_route_name | ||
address_prefixes = var.address_prefixes | ||
next_hop_type = var.next_hop_type | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
output "virtual_hub_connection_id" { | ||
description = "The ID of the virtual hub connection." | ||
value = azurerm_virtual_hub_connection.this.id | ||
} | ||
|
||
output "virtual_hub_connection_name" { | ||
description = "The name of the virtual hub connection." | ||
value = azurerm_virtual_hub_connection.this.name | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
variable "virtual_hub_connection_name" { | ||
type = string | ||
description = "The name of the virtual hub connection." | ||
} | ||
|
||
variable "virtual_hub_id" { | ||
type = string | ||
description = "The ID of the virtual hub." | ||
} | ||
|
||
variable "remote_virtual_network_id" { | ||
type = string | ||
description = "The ID of the remote virtual network." | ||
} | ||
|
||
variable "internet_security_enabled" { | ||
type = bool | ||
description = "Whether or not internet security is enabled." | ||
default = true | ||
} | ||
|
||
variable "associated_route_table_id" { | ||
type = string | ||
description = "The ID of the associated route table." | ||
default = null | ||
} | ||
|
||
variable "labels" { | ||
type = list(string) | ||
description = "The labels for the propagated route table." | ||
default = [] | ||
} | ||
|
||
variable "route_table_ids" { | ||
type = list(string) | ||
description = "The IDs of the propagated route tables." | ||
default = [] | ||
} | ||
|
||
variable "static_vnet_route_name" { | ||
type = string | ||
description = "The name of the static VNet route." | ||
default = null | ||
} | ||
|
||
variable "address_prefixes" { | ||
type = list(string) | ||
description = "The address prefixes for the static VNet route." | ||
default = [] | ||
} | ||
|
||
variable "next_hop_type" { | ||
type = string | ||
description = "The next hop type for the static VNet route." | ||
default = null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Specify the required version of Terraform | ||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
# Specify the required version of the azurerm provider | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">=2.0.0" | ||
} | ||
} | ||
} |