Skip to content

Commit a7705b0

Browse files
authored
feat: support can_ip_forward (#184)
1 parent c244464 commit a7705b0

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ If the user does not share the same domain as the org the bastion is in, you wil
7272
| access\_config | Access configs for network, nat\_ip and DNS | <pre>list(object({<br> network_tier = string<br> nat_ip = string<br> public_ptr_domain_name = string<br> }))</pre> | <pre>[<br> {<br> "nat_ip": "",<br> "network_tier": "PREMIUM",<br> "public_ptr_domain_name": ""<br> }<br>]</pre> | no |
7373
| additional\_networks | Additional network interface details for the instance template, if any. | <pre>list(object({<br> network = string<br> subnetwork = string<br> subnetwork_project = string<br> network_ip = string<br> nic_type = string<br> stack_type = string<br> queue_count = number<br> access_config = list(object({<br> nat_ip = string<br> network_tier = string<br> }))<br> ipv6_access_config = list(object({<br> network_tier = string<br> }))<br> alias_ip_range = list(object({<br> ip_cidr_range = string<br> subnetwork_range_name = string<br> }))<br> }))</pre> | `[]` | no |
7474
| additional\_ports | A list of additional ports/ranges to open access to on the instances from IAP. | `list(string)` | `[]` | no |
75+
| can\_ip\_forward | Whether the bastion should allow IP forwarding. | `bool` | `false` | no |
7576
| create\_firewall\_rule | If we need to create the firewall rule or not. | `bool` | `true` | no |
7677
| create\_instance\_from\_template | Whether to create and instance from the template or not. If false, no instance is created, but the instance template is created and usable by a MIG | `bool` | `true` | no |
7778
| disk\_labels | Key-value map of labels to assign to the bastion host disk | `map(any)` | `{}` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module "instance_template" {
6767
source_image_project = var.image_project
6868
startup_script = var.startup_script
6969
preemptible = var.preemptible
70+
can_ip_forward = var.can_ip_forward ? "true" : "false"
7071

7172
tags = var.tags
7273
labels = var.labels

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,9 @@ variable "additional_networks" {
276276
}))
277277
}
278278

279+
variable "can_ip_forward" {
280+
type = bool
281+
description = "Whether the bastion should allow IP forwarding."
282+
default = false
283+
}
284+

0 commit comments

Comments
 (0)