Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Manages a Cloud Router on Google Cloud

License

NotificationsYou must be signed in to change notification settings

terraform-google-modules/terraform-google-cloud-router

This module handles opinionated Google Cloud Platformcloud router. Optionally it can also createcloud nat

Compatibility

This module is meant for use with Terraform 1.3+ and tested using Terraform 1.3+. If you find incompatibilities using Terraform >=1.3, please open an issue.

Version

Upgrade guides:

Usage

Basic usage of this module is as follows:

module"cloud_router" {source="terraform-google-modules/cloud-router/google"version="~> 8.0"name="example-router"region="us-central1"bgp={# The ASN (16550, 64512 - 65534, 4200000000 - 4294967294) can be any private ASN# not already used as a peer ASN in the same region and network or 16550 for Partner Interconnect.    asn="65001"  }project="<PROJECT ID>"network="default"}

Functional examples are included in theexamples directory. By default logging will be enabled forCloud NAT withfilter set toAll. You can disable cloud nat logging by setting parameters innats.log_config

Inputs

NameDescriptionTypeDefaultRequired
bgpBGP information specific to this router.
object({
asn = string
advertise_mode = optional(string, "CUSTOM")
advertised_groups = optional(list(string))
advertised_ip_ranges = optional(list(object({
range = string
description = optional(string)
})), [])
keepalive_interval = optional(number)
})
nullno
descriptionAn optional description of this resourcestringnullno
encrypted_interconnect_routerAn optional field to indicate if a router is dedicated to use with encrypted Interconnect Attachmentboolfalseno
nameName of the routerstringn/ayes
natsNATs to deploy on this router.
list(object({
name = string
nat_ip_allocate_option = optional(string)
source_subnetwork_ip_ranges_to_nat = optional(string)
nat_ips = optional(list(string), [])
drain_nat_ips = optional(list(string), [])
min_ports_per_vm = optional(number)
max_ports_per_vm = optional(number)
udp_idle_timeout_sec = optional(number)
icmp_idle_timeout_sec = optional(number)
tcp_established_idle_timeout_sec = optional(number)
tcp_transitory_idle_timeout_sec = optional(number)
tcp_time_wait_timeout_sec = optional(number)
enable_endpoint_independent_mapping = optional(bool)
enable_dynamic_port_allocation = optional(bool)

log_config = optional(object({
enable = optional(bool, true)
filter = optional(string, "ALL")
}), {})

subnetworks = optional(list(object({
name = string
source_ip_ranges_to_nat = list(string)
secondary_ip_range_names = optional(list(string))
})), [])

}))
[]no
networkA reference to the network to which this router belongsstringn/ayes
project_idThe project ID to deploy tostringn/ayes
regionRegion where the router residesstringn/ayes

Outputs

NameDescription
natCreated NATs
routerCreated Router

nats

Requirements

These sections describe requirements for using this module.

Software

The following dependencies must be available:

Service Account

A service account with the following roles must be used to provisionthe resources of this module:

  • Network Admin:roles/compute.networkAdmin

TheProject Factory module and the[IAM module][iam-module] may be used in combination to provision aservice account with the necessary roles applied.

APIs

A project with the following APIs enabled must be used to host theresources of this module:

  • Google Cloud Compute Engine API:compute.googleapis.com

TheProject Factory module can be used toprovision a project with the necessary APIs enabled.

Contributing

Refer to thecontribution guidelines forinformation on contributing to this module.


[8]ページ先頭

©2009-2025 Movatter.jp