Skip to content

Commit

Permalink
feat: support can_ip_forward (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
galenwarren authored Apr 5, 2024
1 parent c244464 commit a7705b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ If the user does not share the same domain as the org the bastion is in, you wil
| 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 |
| 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 |
| additional\_ports | A list of additional ports/ranges to open access to on the instances from IAP. | `list(string)` | `[]` | no |
| can\_ip\_forward | Whether the bastion should allow IP forwarding. | `bool` | `false` | no |
| create\_firewall\_rule | If we need to create the firewall rule or not. | `bool` | `true` | no |
| 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 |
| disk\_labels | Key-value map of labels to assign to the bastion host disk | `map(any)` | `{}` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ module "instance_template" {
source_image_project = var.image_project
startup_script = var.startup_script
preemptible = var.preemptible
can_ip_forward = var.can_ip_forward ? "true" : "false"

tags = var.tags
labels = var.labels
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,9 @@ variable "additional_networks" {
}))
}

variable "can_ip_forward" {
type = bool
description = "Whether the bastion should allow IP forwarding."
default = false
}

0 comments on commit a7705b0

Please sign in to comment.