Do not set default ASN number (#1633)
This commit is contained in:
parent
6459e7caa8
commit
9d0fd744a8
|
@ -63,7 +63,6 @@ module "nat" {
|
|||
# tftest modules=2 resources=5 inventory=rules.yaml
|
||||
```
|
||||
<!-- BEGIN TFDOC -->
|
||||
|
||||
## Variables
|
||||
|
||||
| name | description | type | required | default |
|
||||
|
@ -76,7 +75,7 @@ module "nat" {
|
|||
| [config_source_subnets](variables.tf#L39) | Subnetwork configuration (ALL_SUBNETWORKS_ALL_IP_RANGES, ALL_SUBNETWORKS_ALL_PRIMARY_IP_RANGES, LIST_OF_SUBNETWORKS). | <code>string</code> | | <code>"ALL_SUBNETWORKS_ALL_IP_RANGES"</code> |
|
||||
| [config_timeouts](variables.tf#L45) | Timeout configurations. | <code title="object({ icmp = optional(number, 30) tcp_established = optional(number, 1200) tcp_transitory = optional(number, 30) udp = optional(number, 30) })">object({…})</code> | | <code>{}</code> |
|
||||
| [logging_filter](variables.tf#L57) | Enables logging if not null, value is one of 'ERRORS_ONLY', 'TRANSLATIONS_ONLY', 'ALL'. | <code>string</code> | | <code>null</code> |
|
||||
| [router_asn](variables.tf#L78) | Router ASN used for auto-created router. | <code>number</code> | | <code>64514</code> |
|
||||
| [router_asn](variables.tf#L78) | Router ASN used for auto-created router. | <code>number</code> | | <code>null</code> |
|
||||
| [router_create](variables.tf#L84) | Create router. | <code>bool</code> | | <code>true</code> |
|
||||
| [router_name](variables.tf#L90) | Router name, leave blank if router will be created to use auto generated name. | <code>string</code> | | <code>null</code> |
|
||||
| [router_network](variables.tf#L96) | Name of the VPC used for auto-created router. | <code>string</code> | | <code>null</code> |
|
||||
|
@ -93,5 +92,4 @@ module "nat" {
|
|||
| [region](outputs.tf#L32) | Cloud NAT region. | |
|
||||
| [router](outputs.tf#L37) | Cloud NAT router resources (if auto created). | |
|
||||
| [router_name](outputs.tf#L46) | Cloud NAT router name. | |
|
||||
|
||||
<!-- END TFDOC -->
|
||||
|
|
|
@ -28,8 +28,12 @@ resource "google_compute_router" "router" {
|
|||
project = var.project_id
|
||||
region = var.region
|
||||
network = var.router_network
|
||||
bgp {
|
||||
asn = var.router_asn
|
||||
|
||||
dynamic "bgp" {
|
||||
for_each = var.router_asn == null ? [] : [1]
|
||||
content {
|
||||
asn = var.router_asn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ variable "region" {
|
|||
variable "router_asn" {
|
||||
description = "Router ASN used for auto-created router."
|
||||
type = number
|
||||
default = 64514
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "router_create" {
|
||||
|
|
Loading…
Reference in New Issue