You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/vmss_existing_vnet/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,7 @@ module "example_module" {
49
49
availability_zones_num = "1"
50
50
minimum_number_of_vm_instances = 2
51
51
maximum_number_of_vm_instances = 10
52
+
number_of_vm_instances = 2
52
53
management_name = "mgmt"
53
54
management_IP = "13.92.42.181"
54
55
management_interface = "eth1-private"
@@ -108,6 +109,7 @@ module "example_module" {
108
109
|**availability_zones_num**| A list of a single item of the Availability Zone which the Virtual Machine should be allocated in | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth". |
109
110
|**minimum_number_of_vm_instances**| The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10. |
110
111
|**maximum_number_of_vm_instances**| The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10. |
112
+
|**number_of_vm_instances**| The default number of VMSS instances to deploy. | number | The number of VMSS instances must not be less then `minimum_number_of_vm_instances`. If the number of VMSS is greater then the `maximum_number_of_vm_instances` use the maximum number as default.<br/>**Default**: 2; |
111
113
|**management_name**| The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long. |
112
114
|**management_IP**| The IP address used to manage the VMSS instances | string | A valid IP address. |
113
115
|**management_interface**| Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;<br/>"eth0-private" - Manages the GWs using their external NIC's private IP address;<br/>"eth1-private" - Manages the GWs using their internal NIC's private IP address.<br/>**Default:** "eth1-private" |
// Validate that the minimum number of VM instances is at least 0.
6
+
// If not, return an error message.
7
+
validate_number_of_vm_instances_range=var.minimum_number_of_vm_instances>=0&& var.maximum_number_of_vm_instances>=0?0:index("error: The minimum and maximum number of VM instances must be at least 0.")
8
+
9
+
// Validate that the maximum number of VM instances is greater than or equal to the minimum number of VM instances.
10
+
// If not, return an error message.
11
+
validate_maximum_number_of_vm_instances=var.maximum_number_of_vm_instances>= var.minimum_number_of_vm_instances?0:index("error: The maximum number of VM instances must be greater than or equal to the minimum number of VM instances.")
12
+
13
+
// The number of VM instances should not exceed the maximum allowed.
14
+
// If the provided number of instances exceeds the maximum, use the maximum instead.
// Validate the number of VM instances against the minimum requirement.
18
+
// If the number of instances is less than the minimum, return an error message.
19
+
validate_number_of_vm_instances=local.number_of_vm_instances>= var.minimum_number_of_vm_instances?0:index("error: The number of VM instances must be at least ${var.minimum_number_of_vm_instances}.")
Copy file name to clipboardExpand all lines: modules/vmss_new_vnet/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ module "example_module" {
53
53
availability_zones_num = "1"
54
54
minimum_number_of_vm_instances = 2
55
55
maximum_number_of_vm_instances = 10
56
+
number_of_vm_instances = 2
56
57
management_name = "mgmt"
57
58
management_IP = "13.92.42.181"
58
59
management_interface = "eth1-private"
@@ -105,8 +106,9 @@ module "example_module" {
105
106
|**allow_upload_download**| Automatically download Blade Contracts and other important data. Improve product experience by sending data to Check Point | boolean | true;<br />false;<br /> |
106
107
|**authentication_type**| Specifies whether a password authentication or SSH Public Key authentication should be used | string | "Password";<br />"SSH Public Key";<br /> |
107
108
|**availability_zones_num**| A list of a single item of the Availability Zone where the Virtual Machine should be allocated | string | "centralus", "eastus2", "francecentral", "northeurope", "southeastasia", "westeurope", "westus2", "eastus", "uksouth"<br /> |
108
-
|**minimum_number_of_vm_instances**| The minimum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10<br /> |
109
-
|**maximum_number_of_vm_instances**| The maximum number of VMSS instances for this resource | number | Valid values are in the range 0 - 10<br /> |
109
+
|**minimum_number_of_vm_instances**| The minimum number of VMSS instances for this resource. | number | Valid values are in the range 0 - 10<br /> |
110
+
|**maximum_number_of_vm_instances**| The maximum number of VMSS instances for this resource. | number | Valid values are in the range 0 - 10<br /> |
111
+
|**number_of_vm_instances**| The default number of VMSS instances to deploy. | number | The number of VMSS instances must not be less then `minimum_number_of_vm_instances`. If the number of VMSS is greater then the `maximum_number_of_vm_instances` use the maximum number by default.<br/>**Default**: 2; |
110
112
|**management_name**| The name of the management server as it appears in the configuration file | string | Field cannot be empty. Only alphanumeric characters or '_'/'-' are allowed, and the name must be 1-30 characters long<br /> |
111
113
|**management_IP**| The IP address used to manage the VMSS instances | string | A valid IP address<br /> |
112
114
|**management_interface**| Management option for the Gateways in the VMSS | string | "eth0-public" - Manages the GWs using their external NIC's public IP address;<br />"eth0-private" - Manages the GWs using their external NIC's private IP address;<br />"eth1-private" - Manages the GWs using their internal NIC's private IP address;<br />**Default:** "eth1-private" |
// Validate that the minimum number of VM instances is at least 0.
6
+
// If not, return an error message.
7
+
validate_number_of_vm_instances_range=var.minimum_number_of_vm_instances>=0&& var.maximum_number_of_vm_instances>=0?0:index("error: The minimum and maximum number of VM instances must be at least 0.")
8
+
9
+
// Validate that the maximum number of VM instances is greater than or equal to the minimum number of VM instances.
10
+
// If not, return an error message.
11
+
validate_maximum_number_of_vm_instances=var.maximum_number_of_vm_instances>= var.minimum_number_of_vm_instances?0:index("error: The maximum number of VM instances must be greater than or equal to the minimum number of VM instances.")
12
+
13
+
// The number of VM instances should not exceed the maximum allowed.
14
+
// If the provided number of instances exceeds the maximum, use the maximum instead.
// Validate the number of VM instances against the minimum requirement.
18
+
// If the number of instances is less than the minimum, return an error message.
19
+
validate_number_of_vm_instances=local.number_of_vm_instances>= var.minimum_number_of_vm_instances?0:index("error: The number of VM instances must be at least ${var.minimum_number_of_vm_instances}.")
0 commit comments