Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stealthllama committed Feb 20, 2020
1 parent d76ac1c commit 4ed4b7c
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 64 deletions.
70 changes: 67 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# terraform-azurerm-panos-bootstrap

The terraform-azurerm-panos-bootstrap module is used to create an Azure file share that to be used for bootstrapping Palo Alto Networks VM-Series virtual firewall instances. This bootstrap package will include an `init-cfg.txt` file that provides the basic configuration details to configure the VM-Series instance and register it with its Panorama management console. It may optionally include a PAN-OS software image, application and threat signature updates, VM-Series plug-ins, and/or license files.
The terraform-azurerm-panos-bootstrap module is used to create an Azure file share that to be used for bootstrapping Palo Alto Networks VM-Series virtual firewall instances. A bootstrap package must include an `init-cfg.txt` file that provides the basic configuration details to configure the VM-Series instance and register it with its Panorama management console. This file will be generated by this module using the variables provided.

The bootstrap package may optionally include a PAN-OS software image, application and threat signature updates, VM-Series plug-ins, and/or license files.

## Directory and file structure
The root directory of the Terraform plan calling this module should include a `files` directory containing a subdirectory structure similar to the one below.
Expand All @@ -13,7 +15,6 @@ files
├── plugins
└── software
```
This

## Example

Expand Down Expand Up @@ -45,7 +46,7 @@ module "bootstrap" {
}
```

## Usage
## Instructions

1. Define a `main.tf` file that calls the module and provides any required and optional variables.
2. Define a `variables.tf` file that declares the variables that will be utilized.
Expand All @@ -57,6 +58,69 @@ module "bootstrap" {
8. Validate the plan using the `terraform plan` command.
9. Apply the plan using the `terraform apply` command.

## Utilization

The module output will provide values for the `storage_account`, `access_key`, and `share_name`. These values can then be used in a `azurerm_virtual_machine` resource to instantiate a VM-Series instance. They are used in the `os_profile{custom_data}` parameter.

```terraform
resource "azurerm_virtual_machine" "vmseries" {
count = var.vm_count
name = "${var.name}${count.index + 1}"
location = var.location
resource_group_name = var.resource_group_name
vm_size = var.size
primary_network_interface_id = element(azurerm_network_interface.nic0.*.id, count.index)
network_interface_ids = [
element(azurerm_network_interface.nic0.*.id, count.index),
element(azurerm_network_interface.nic1.*.id, count.index),
element(azurerm_network_interface.nic2.*.id, count.index),
]
availability_set_id = azurerm_availability_set.default.id
os_profile_linux_config {
disable_password_authentication = false
}
plan {
name = var.license
publisher = "paloaltonetworks"
product = "vmseries1"
}
storage_image_reference {
publisher = "paloaltonetworks"
offer = "vmseries1"
sku = var.license
version = var.panos
}
storage_os_disk {
name = "${var.name}${count.index + 1}-osdisk"
caching = "ReadWrite"
create_option = "FromImage"
managed_disk_type = "Standard_LRS"
}
os_profile {
computer_name = "${var.name}${count.index + 1}"
admin_username = var.username
admin_password = var.password
custom_data = join(
",",
[
"storage-account=${var.storage_account}",
"access-key=${var.access_key}",
"file-share=${var.share_name}",
"share-directory=${var.share_directory}"
],
)
}
}
```


## References
* [VM-Series Firewall Bootstrap Workflow](https://docs.paloaltonetworks.com/vm-series/9-1/vm-series-deployment/bootstrap-the-vm-series-firewall/vm-series-firewall-bootstrap-workflow.html#id59fe5979-c29d-42aa-8e72-14a2c12855f6)
* [Bootstrap the VM-Series Firewall on Azure](https://docs.paloaltonetworks.com/vm-series/9-1/vm-series-deployment/bootstrap-the-vm-series-firewall/bootstrap-the-vm-series-firewall-in-azure.html#idd51f75b8-e579-44d6-a809-2fafcfe4b3b6)
Expand Down
60 changes: 0 additions & 60 deletions examples/exampleA/README.md

This file was deleted.

1 change: 0 additions & 1 deletion examples/exampleB/README.md

This file was deleted.

0 comments on commit 4ed4b7c

Please sign in to comment.