diff --git a/.terraform.lock b/.terraform.lock new file mode 100644 index 0000000..e69de29 diff --git a/modules/bastion-group/README.md b/modules/bastion-group/README.md index a12afa0..e1812a2 100644 --- a/modules/bastion-group/README.md +++ b/modules/bastion-group/README.md @@ -74,6 +74,7 @@ provision a project with the necessary APIs enabled. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | additional\_networks | Additional network interface details for the instance template, if any. |
list(object({| `[]` | no | +| additional\_ports | A list of additional ports/ranges to open access to on the instances from IAP. | `list(string)` | `[]` | no | | fw\_name\_allow\_ssh\_from\_health\_check\_cidrs | Firewall rule name for allowing Health Checks | `string` | `"allow-ssh-from-health-check-cidrs"` | no | | fw\_name\_allow\_ssh\_from\_iap | Firewall rule name for allowing SSH from IAP | `string` | `"allow-ssh-from-iap-to-bastion-group"` | no | | health\_check | Health check config for the mig. |
network = string
subnetwork = string
subnetwork_project = string
network_ip = string
nic_type = string
stack_type = string
queue_count = number
access_config = list(object({
nat_ip = string
network_tier = string
}))
ipv6_access_config = list(object({
network_tier = string
}))
alias_ip_range = list(object({
ip_cidr_range = string
subnetwork_range_name = string
}))
}))
object({|
type = string
initial_delay_sec = number
check_interval_sec = number
healthy_threshold = number
timeout_sec = number
unhealthy_threshold = number
response = string
proxy_header = string
port = number
request = string
enable_logging = bool
# Unused fields.
request_path = string
host = string
})
{| no | diff --git a/modules/bastion-group/main.tf b/modules/bastion-group/main.tf index bc72843..867c737 100644 --- a/modules/bastion-group/main.tf +++ b/modules/bastion-group/main.tf @@ -35,6 +35,7 @@ module "iap_bastion" { startup_script = var.startup_script subnet = var.subnet additional_networks = var.additional_networks + additional_ports = var.additional_ports zone = var.zone random_role_id = var.random_role_id fw_name_allow_ssh_from_iap = var.fw_name_allow_ssh_from_iap diff --git a/modules/bastion-group/variables.tf b/modules/bastion-group/variables.tf index 558e022..5e7f7cd 100644 --- a/modules/bastion-group/variables.tf +++ b/modules/bastion-group/variables.tf @@ -197,6 +197,12 @@ variable "fw_name_allow_ssh_from_iap" { default = "allow-ssh-from-iap-to-bastion-group" } +variable "additional_ports" { + description = "A list of additional ports/ranges to open access to on the instances from IAP." + type = list(string) + default = [] +} + variable "additional_networks" { description = "Additional network interface details for the instance template, if any." default = []
"check_interval_sec": 30,
"enable_logging": false,
"healthy_threshold": 1,
"host": "",
"initial_delay_sec": 30,
"port": 22,
"proxy_header": "NONE",
"request": "",
"request_path": "",
"response": "",
"timeout_sec": 10,
"type": "tcp",
"unhealthy_threshold": 5
}