Skip to content

Commit

Permalink
DEV2-3477: Propagate nat_ips setting. (#59)
Browse files Browse the repository at this point in the history
* DEV2-3477: Propagate `nat_ips` setting.

* terraform-docs: automated action

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Simon Yakov and github-actions[bot] authored Aug 17, 2023
1 parent b027f0a commit fbf63fb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions modules/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module "gke_cluster_tabnine" {
| <a name="input_exclude_kubernetes_manifest"></a> [exclude\_kubernetes\_manifest](#input\_exclude\_kubernetes\_manifest) | Exclude kubernetes manifest installations. This should be off during initial installation | `bool` | `false` | no |
| <a name="input_gke_master_authorized_networks"></a> [gke\_master\_authorized\_networks](#input\_gke\_master\_authorized\_networks) | n/a | <pre>list(object({<br> cidr_block = string,<br> display_name = string<br> }))</pre> | n/a | yes |
| <a name="input_min_gpu_machines"></a> [min\_gpu\_machines](#input\_min\_gpu\_machines) | Minimum number of GPU instances | `number` | `1` | no |
| <a name="input_nat_ips"></a> [nat\_ips](#input\_nat\_ips) | nat\_ips (list(number), optional): Self-links of NAT IPs. | `list(number)` | `[]` | no |
| <a name="input_pre_shared_cert_name"></a> [pre\_shared\_cert\_name](#input\_pre\_shared\_cert\_name) | Use this if you already uploaded a pre-shared cert | `string` | `null` | no |
| <a name="input_prefix"></a> [prefix](#input\_prefix) | Prefix all resources names | `string` | `"tabnine-self-hosted"` | no |
| <a name="input_project_id"></a> [project\_id](#input\_project\_id) | GCP project ID | `string` | n/a | yes |
Expand Down
9 changes: 6 additions & 3 deletions modules/cluster/cloud_router.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ module "cloud_router" {
project = var.project_id
region = var.region

nats = [{
name = format("%s-nat-gateway", var.prefix)
}]
nats = [
{
name = format("%s-nat-gateway", var.prefix)
nat_ips = var.nat_ips
}
]
}
5 changes: 5 additions & 0 deletions modules/cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ variable "gke_master_authorized_networks" {
}))
}

variable "nat_ips" {
type = list(number)
default = []
description = "nat_ips (list(number), optional): Self-links of NAT IPs."
}
locals {
db_master_zone = var.db_master_zone != null ? var.db_master_zone : data.google_compute_zones.available.names[0]
private_service_connect_ip = "10.10.40.1"
Expand Down

0 comments on commit fbf63fb

Please sign in to comment.