From 04e285fc9d2a0a71c8b368c032a4c75b0bae3b25 Mon Sep 17 00:00:00 2001 From: michalbil Date: Thu, 3 Mar 2022 18:38:05 +0100 Subject: [PATCH] feat(vmss): support for public IP prefix for mgmt interface --- modules/vmss/README.md | 1 + modules/vmss/main.tf | 1 + modules/vmss/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/modules/vmss/README.md b/modules/vmss/README.md index 6f241e15..b59069d6 100644 --- a/modules/vmss/README.md +++ b/modules/vmss/README.md @@ -69,6 +69,7 @@ No modules. | [location](#input\_location) | Region to install VM-Series and dependencies. | `string` | n/a | yes | | [metrics\_retention\_in\_days](#input\_metrics\_retention\_in\_days) | Specifies the metrics retention period in days. Possible values are 0, 30, 60, 90, 120, 180, 270, 365, 550 or 730. Defaults to 90. A special value 0 disables creation of Application Insights altogether, which is incompatible with `create_autoscaling`. | `number` | `null` | no | | [mgmt\_pip\_domain\_name\_label](#input\_mgmt\_pip\_domain\_name\_label) | n/a | `string` | `null` | no | +| [mgmt\_pip\_prefix\_id](#input\_mgmt\_pip\_prefix\_id) | Public IP address prefix id to use for management interface. | `string` | `null` | no | | [name\_application\_insights](#input\_name\_application\_insights) | Name of the Applications Insights instance to be created. Can be null, in which case a default name is auto-generated. | `string` | `null` | no | | [name\_autoscale](#input\_name\_autoscale) | Name of the Autoscale Settings to be created. Can be null, in which case a default name is auto-generated. | `string` | `null` | no | | [name\_fw\_mgmt\_pip](#input\_name\_fw\_mgmt\_pip) | n/a | `string` | `"fw-mgmt-pip"` | no | diff --git a/modules/vmss/main.tf b/modules/vmss/main.tf index 2614d2b2..06c21aea 100644 --- a/modules/vmss/main.tf +++ b/modules/vmss/main.tf @@ -75,6 +75,7 @@ resource "azurerm_linux_virtual_machine_scale_set" "this" { name = "${var.name_prefix}${var.name_fw_mgmt_pip}" domain_name_label = var.mgmt_pip_domain_name_label idle_timeout_in_minutes = 4 + public_ip_prefix_id = var.mgmt_pip_prefix_id } } } diff --git a/modules/vmss/variables.tf b/modules/vmss/variables.tf index ec4e2caf..ee95f9dc 100644 --- a/modules/vmss/variables.tf +++ b/modules/vmss/variables.tf @@ -49,6 +49,12 @@ variable "mgmt_pip_domain_name_label" { type = string } +variable "mgmt_pip_prefix_id" { + description = "Public IP address prefix id to use for management interface." + default = null + type = string +} + variable "public_pip_domain_name_label" { default = null type = string