Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add labels to VPN tunnel #76

Merged
merged 3 commits into from
Apr 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/vpn_ha/README.md
Original file line number Diff line number Diff line change
@@ -132,6 +132,7 @@ module "vpn_ha" {
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| create\_vpn\_gateway | create a VPN gateway | `bool` | `true` | no |
| labels | Labels for vpn components | `map(string)` | `{}` | no |
| name | VPN gateway name, and prefix used for dependent resources. | `string` | n/a | yes |
| network | VPC used for the gateway and routes. | `string` | n/a | yes |
| peer\_external\_gateway | Configuration of an external VPN gateway to which this VPN is connected. | <pre>object({<br> redundancy_type = string<br> interfaces = list(object({<br> id = number<br> ip_address = string<br> }))<br> })</pre> | `null` | no |
1 change: 1 addition & 0 deletions modules/vpn_ha/main.tf
Original file line number Diff line number Diff line change
@@ -165,6 +165,7 @@ resource "google_compute_vpn_tunnel" "tunnels" {
ike_version = each.value.ike_version
shared_secret = each.value.shared_secret == "" ? local.secret : each.value.shared_secret
vpn_gateway = local.vpn_gateway_self_link
labels = var.labels
}

resource "random_id" "secret" {
6 changes: 6 additions & 0 deletions modules/vpn_ha/variables.tf
Original file line number Diff line number Diff line change
@@ -112,3 +112,9 @@ variable "create_vpn_gateway" {
default = true
type = bool
}

variable "labels" {
description = "Labels for vpn components"
type = map(string)
default = {}
}