Skip to content

Commit d11b2c2

Browse files
Sync azure Terraform module documentation
1 parent 6ad29e6 commit d11b2c2

File tree

9 files changed

+353
-189
lines changed

9 files changed

+353
-189
lines changed

products/terraform/docs/swfw/azure/cloudngfw/modules/name_templater.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ As you can see:
6161
* the `prefix` key is just a placeholder that eventually is replaced with the value of `name_prefix`
6262
* the `__random__` string is replaced with a name of a [random pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) (in case you need to randomize some name, for testing purposes for example)
6363
* the `__default__` string is replaced with a resource abbreviation.
64-
This abbreviations are defined with `var.abbreviations` variable. The module contains basic abbreviations following Microsoft suggestions, but they can be overridden with custom definitions.
64+
This abbreviations are defined with `var.abbreviations` variable. The module contains basic abbreviations following Microsoft suggestions, but they can be overriden with custom definitions.
6565
The important part is that the `resource_type` has to match an entry in `abbreviations` variable, otherwise the abbreviation will be replaced with an empty string.
6666

6767
To create the actual resource name the following code can be used:
@@ -199,4 +199,4 @@ Type: map(string)
199199

200200
Default value: `map[application_gw:agw application_insights:appi availability_set:avail bastion:bas data_disk:disk file_share:share load_balancer:lb log_analytics_workspace:log managed_identity:id nat_gw:ng network_interface:nic nsg:nsg nsg_rule:nsgsr os_disk:osdisk public_ip:pip public_ip_prefix:ippre resource_group:rg route_table:rt service_endpoint:se storage_account:st subnet:snet udr:udr virtual_machine:vm virtual_machine_scale_set:vmss virtual_network_gateway:vgw vnet:vnet vnet_peering:peer]`
201201

202-
<sup>[back to list](#modules-optional-inputs)</sup>
202+
<sup>[back to list](#modules-optional-inputs)</sup>

products/terraform/docs/swfw/azure/cloudngfw/modules/vmseries.md

Lines changed: 74 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Firewall parameters configuration.
212212
This map contains basic, as well as some optional Firewall parameters. Both types contain sane defaults.
213213
Nevertheless they should be at least reviewed to meet deployment requirements.
214214

215-
List of either required or important properties:
215+
List of either required or important properties:
216216

217217
- `size` - (`string`, optional, defaults to `Standard_D3_v2`) Azure VM size (type). Consult the *VM-Series
218218
Deployment Guide* as only a few selected sizes are supported.
@@ -231,7 +231,7 @@ List of either required or important properties:
231231

232232
For more details on bootstrapping [see documentation](https://docs.paloaltonetworks.com/vm-series/10-2/vm-series-deployment/bootstrap-the-vm-series-firewall/create-the-init-cfgtxt-file/init-cfgtxt-file-components).
233233

234-
List of other, optional properties:
234+
List of other, optional properties:
235235

236236
- `avset_id` - (`string`, optional, default to `null`) identifier of the Availability Set to use.
237237
- `capacity_reservation_group_id` - (`string`, optional, defaults to `null`) specifies the ID of the Capacity Reservation Group
@@ -250,7 +250,7 @@ List of other, optional properties:
250250
- `identity_type` - (`string`, optional, defaults to `SystemAssigned`) type of Managed Service Identity that
251251
should be configured on this VM. Can be one of "SystemAssigned", "UserAssigned" or
252252
"SystemAssigned, UserAssigned".
253-
- `identity_ids` - (`list`, optional, defaults to `[]`) a list of User Assigned Managed Identity IDs to be
253+
- `identity_ids` - (`list`, optional, defaults to `[]`) a list of User Assigned Managed Identity IDs to be
254254
assigned to this VM. Required only if `identity_type` is not "SystemAssigned".
255255

256256

@@ -290,26 +290,30 @@ Interfaces will be attached to VM in the order you define here, therefore:
290290

291291
- The first should be the management interface, which does not participate in data filtering.
292292
- The remaining ones are the dataplane interfaces.
293-
293+
294294
Following configuration options are available:
295295

296296
- `name` - (`string`, required) the interface name.
297297
- `subnet_id` - (`string`, required) ID of an existing subnet to create the interface in.
298-
- `ip_configuration_name` - (`string`, optional, defaults to `primary`) the name of the interface IP configuration.
299-
- `private_ip_address` - (`string`, optional, defaults to `null`) static private IP to assign to the interface. When
300-
skipped Azure will assign one dynamically. Keep in mind that a dynamic IP is guarantied not
301-
to change as long as the VM is running. Any stop/deallocate/restart operation might cause
302-
the IP to change.
303-
- `create_public_ip` - (`bool`, optional, defaults to `false`) if `true`, creates a public IP for the interface.
304-
- `public_ip_name` - (`string`, optional, defaults to `null`) name of the public IP to associate with the
305-
interface. When `create_public_ip` is set to `true` this will become a name of a newly
306-
created Public IP interface. Otherwise this is a name of an existing interfaces that will
307-
be sourced and attached to the interface. Not used when using `public_ip` module.
308-
- `public_ip_resource_group_name` - (`string`, optional, defaults to `var.resource_group_name`) name of a Resource Group that
309-
contains public IP that that will be associated with the interface. Used only when
310-
`create_public_ip` is `false`.
311-
- `public_ip_id` - (`string`, optional, defaults to `null`) ID of the public IP to associate with the
312-
interface. Property is used when public IP is not created or sourced within this module.
298+
- ip_configurations - (`map`, required) A map that contains the IP configurations for the interface.
299+
- `name` - (`string`, optional, defaults to `primary`) the name of the interface IP configuration.
300+
- `primary` - (`bool`, optional, defaults to `true`) sets the current IP configuration as the primary
301+
one.
302+
- `private_ip_address` - (`string`, optional, defaults to `null`) static private IP to assign to the interface.
303+
When skipped Azure will assign one dynamically. Keep in mind that a dynamic IP is
304+
guaranteed not to change as long as the VM is running. Any stop/deallocate/restart
305+
operation might cause the IP to change.
306+
- `create_public_ip` - (`bool`, optional, defaults to `false`) if `true`, creates a public IP for the interface.
307+
**Note!** When you define multiple IP configurations, exactly one must be the primary.
308+
- `public_ip_name` - (`string`, optional, defaults to `null`) name of the public IP to associate with the
309+
interface. When `create_public_ip` is set to `true` this will become a name of a newly
310+
created Public IP interface. Otherwise this is a name of an existing interfaces that will
311+
be sourced and attached to the interface. Not used when using `public_ip` module.
312+
- `public_ip_resource_group_name` - (`string`, optional, defaults to `var.resource_group_name`) name of a Resource Group that
313+
contains public IP that that will be associated with the interface. Used only when
314+
`create_public_ip` is `false`.
315+
- `public_ip_id` - (`string`, optional, defaults to `null`) ID of the public IP to associate with the
316+
interface. Property is used when public IP is not created or sourced within this module.
313317
- `attach_to_lb_backend_pool` - (`bool`, optional, defaults to `false`) set to `true` if you would like to associate this
314318
interface with a Load Balancer backend pool.
315319
- `lb_backend_pool_id` - (`string`, optional, defaults to `null`) ID of an existing backend pool to associate the
@@ -327,17 +331,49 @@ Example:
327331
{
328332
name = "fw-mgmt"
329333
subnet_id = azurerm_subnet.my_mgmt_subnet.id
330-
public_ip_name = "fw-mgmt-pip"
331-
create_public_ip = true
334+
ip_configurations = {
335+
primary-ip = {
336+
name = "primary-ip"
337+
primary = true
338+
create_public_ip = true
339+
public_ip_name = "fw-mgmt-pip"
340+
}
332341
},
333342
# public interface reusing an existing public IP resource
334343
{
335344
name = "fw-public"
336345
subnet_id = azurerm_subnet.my_pub_subnet.id
337346
attach_to_lb_backend_pool = true
338347
lb_backend_pool_id = module.inbound_lb.backend_pool_id
339-
create_public_ip = false
340-
public_ip_name = "fw-public-pip"
348+
ip_configurations = {
349+
primary-ip = {
350+
name = "primary-ip"
351+
primary = true
352+
create_public_ip = false
353+
public_ip_name = "fw-public-pip"
354+
}
355+
},
356+
# interface with 2 IP addresses
357+
{
358+
name = "fw-two-ips"
359+
subnet_id = azurerm_subnet.my_pub_subnet.id
360+
attach_to_lb_backend_pool = true
361+
lb_backend_pool_id = module.inbound_lb.backend_pool_id
362+
ip_configurations = {
363+
primary-ip = {
364+
name = "primary-ip"
365+
primary = true
366+
create_public_ip = false
367+
private_ip_address = "10.0.0.5"
368+
public_ip_name = "fw-public-pip"
369+
},
370+
secondary-ip = {
371+
name = "secondary-ip"
372+
primary = false
373+
create_public_ip = false
374+
private_ip_address = "10.0.0.6"
375+
public_ip_name = "fw-public-pip"
376+
}
341377
},
342378
]
343379
```
@@ -347,18 +383,21 @@ Type:
347383

348384
```hcl
349385
list(object({
350-
name = string
351-
subnet_id = string
352-
ip_configuration_name = optional(string, "primary")
353-
create_public_ip = optional(bool, false)
354-
public_ip_name = optional(string)
355-
public_ip_resource_group_name = optional(string)
356-
public_ip_id = optional(string)
357-
private_ip_address = optional(string)
358-
lb_backend_pool_id = optional(string)
359-
attach_to_lb_backend_pool = optional(bool, false)
360-
appgw_backend_pool_id = optional(string)
361-
attach_to_appgw_backend_pool = optional(bool, false)
386+
name = string
387+
subnet_id = string
388+
ip_configurations = map(object({
389+
name = optional(string, "primary")
390+
primary = optional(bool, true)
391+
create_public_ip = optional(bool, false)
392+
public_ip_name = optional(string)
393+
public_ip_resource_group_name = optional(string)
394+
public_ip_id = optional(string)
395+
private_ip_address = optional(string)
396+
}))
397+
lb_backend_pool_id = optional(string)
398+
attach_to_lb_backend_pool = optional(bool, false)
399+
appgw_backend_pool_id = optional(string)
400+
attach_to_appgw_backend_pool = optional(bool, false)
362401
}))
363402
```
364403

products/terraform/docs/swfw/azure/cloudngfw/modules/vmss.md

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -292,22 +292,26 @@ Following configuration options are available:
292292

293293
- `name` - (`string`, required) the interface name.
294294
- `subnet_id` - (`string`, required) ID of an existing subnet to create the interface in.
295-
- `create_public_ip` - (`bool`, optional, defaults to `false`) if `true`, create a public IP for the interface.
296-
- `pip_domain_name_label` - (`string`, optional, defaults to `null`) the Prefix which should be used for the Domain
297-
Name Label for each Virtual Machine Instance.
298-
- `pip_idle_timeout_in_minutes` - (`number`, optional, defaults to Azure default) the Idle Timeout in minutes for the Public
299-
IP Address, possible values are in the range from 4 to 32.
300-
- `pip_prefix_name` - (`string`, optional) the name of an existing Public IP Address Prefix from where Public IP
301-
Addresses should be allocated.
302-
- `pip_prefix_resource_group_name` - (`string`, optional, defaults to the VMSS's RG) name of a Resource Group hosting an
303-
existing Public IP Prefix resource.
304-
- `pip_prefix_id` - (`string`, optional) you can specify Public IP Prefix ID as an alternative to the
305-
properties above (name and resource group), in case you want to avoid using a data source
306-
block.
295+
- `ip_configurations` - (`map`, required) A map that contains the IP configurations for the interface.
296+
- `name` - (`string`, optional, defaults to `primary`) the name of the interface IP configuration.
297+
- `primary` - (`bool`, optional, defaults to `true`) sets the current IP configuration as the primary
298+
one.
299+
- `create_public_ip` - (`bool`, optional, defaults to `false`) if `true`, create a public IP for the interface.
300+
- `pip_domain_name_label` - (`string`, optional, defaults to `null`) the Prefix which should be used for the Domain
301+
Name Label for each Virtual Machine Instance.
302+
- `pip_idle_timeout_in_minutes` - (`number`, optional, defaults to Azure default) the Idle Timeout in minutes for the
303+
Public IP Address, possible values are in the range from 4 to 32.
304+
- `pip_prefix_name` - (`string`, optional) the name of an existing Public IP Address Prefix from where Public
305+
IP Addresses should be allocated.
306+
- `pip_prefix_resource_group_name` - (`string`, optional, defaults to the VMSS's RG) name of a Resource Group hosting an
307+
existing Public IP Prefix resource.
308+
- `pip_prefix_id` - (`string`, optional) you can specify Public IP Prefix ID as an alternative to the
309+
properties above (name and resource group), in case you want to avoid using a data
310+
source block.
307311
- `lb_backend_pool_ids` - (`list`, optional, defaults to `[]`) a list of identifiers of existing Load Balancer
308-
backend pools to associate the interface with.
312+
backend pools to associate the interface with. Only applied to primary IP configuration.
309313
- `appgw_backend_pool_ids` - (`list`, optional, defaults to `[]`) a list of identifier of Application Gateway's backend
310-
pools to associate the interface with.
314+
pools to associate the interface with. Only applied to primary IP configuration.
311315

312316
Example:
313317

@@ -316,16 +320,33 @@ Example:
316320
{
317321
name = "management"
318322
subnet_id = azurerm_subnet.my_mgmt_subnet.id
319-
create_pip = true
323+
ip_configurations = {
324+
primary-ip = {
325+
name = "primary-ip"
326+
primary = true
327+
create_public_ip = true
328+
}
320329
},
321330
{
322331
name = "private"
323332
subnet_id = azurerm_subnet.my_priv_subnet.id
333+
ip_configurations = {
334+
primary-ip = {
335+
name = "primary-ip"
336+
primary = true
337+
create_public_ip = false
338+
}
324339
},
325340
{
326341
name = "public"
327342
subnet_id = azurerm_subnet.my_pub_subnet.id
328343
lb_backend_pool_ids = [azurerm_lb_backend_address_pool.lb_backend.id]
344+
ip_configurations = {
345+
primary-ip = {
346+
name = "primary-ip"
347+
primary = true
348+
create_public_ip = true
349+
}
329350
}
330351
]
331352
```
@@ -335,16 +356,20 @@ Type:
335356

336357
```hcl
337358
list(object({
338-
name = string
339-
subnet_id = string
340-
create_public_ip = optional(bool, false)
341-
pip_domain_name_label = optional(string)
342-
pip_idle_timeout_in_minutes = optional(number)
343-
pip_prefix_name = optional(string)
344-
pip_prefix_resource_group_name = optional(string)
345-
pip_prefix_id = optional(string)
346-
lb_backend_pool_ids = optional(list(string), [])
347-
appgw_backend_pool_ids = optional(list(string), [])
359+
name = string
360+
subnet_id = string
361+
ip_configurations = map(object({
362+
name = optional(string, "primary")
363+
primary = optional(bool, true)
364+
create_public_ip = optional(bool, false)
365+
pip_domain_name_label = optional(string)
366+
pip_idle_timeout_in_minutes = optional(number)
367+
pip_prefix_name = optional(string)
368+
pip_prefix_resource_group_name = optional(string)
369+
pip_prefix_id = optional(string)
370+
}))
371+
lb_backend_pool_ids = optional(list(string), [])
372+
appgw_backend_pool_ids = optional(list(string), [])
348373
}))
349374
```
350375

0 commit comments

Comments
 (0)