generated from equinix-labs/terraform-equinix-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial MVP- Palo Alto Firewall Module
- Loading branch information
1 parent
2f5faa9
commit 023c45f
Showing
50 changed files
with
2,137 additions
and
0 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
examples/Palo-Alto-Network-Firewall/pa-vm-firewall-cluster/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Network Edge Palo Alto Firewall Cluster Example | ||
|
||
This example demonstrates creation of Network Edge Palo Alto Firewall Cluster. It will: | ||
|
||
- Create a ACL template | ||
- Create a management ACL template | ||
- Create an SSH key | ||
- Provision Palo Alto Firewall Cluster | ||
|
||
## Usage | ||
|
||
To provision this example, you should clone the github repository and run terraform from within this directory: | ||
|
||
```bash | ||
git clone https://github.com/equinix/terraform-equinix-network-edge.git | ||
cd terraform-equinix-network-edge/examples/pa-vm-firewall-cluster | ||
terraform init | ||
terraform apply | ||
``` | ||
|
||
Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these | ||
resources. | ||
|
||
<!-- TEMPLATE: The following block has been generated by terraform-docs util: https://github.com/terraform-docs/terraform-docs --> | ||
<!-- BEGIN_TF_DOCS --> | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|---------------------------------------------------------------------------|-----------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.4 | | ||
| <a name="requirement_equinix"></a> [equinix](#requirement\_equinix) | ~> 1.34.0 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|---------------------------------------------------------------|-----------| | ||
| <a name="provider_equinix"></a> [equinix](#provider\_equinix) | ~> 1.34.0 | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | ||
| [equinix_network_acl_template.pa-vm-pri](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template) | resource | | ||
| [equinix_network_ssh_key.johndoe](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_ssh_key) | resource | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|:--------:| | ||
| <a name="input_equinix_client_id"></a> [equinix\_client\_id](#input\_equinix\_client\_id) | API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTID shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_equinix_client_secret"></a> [equinix\_client\_secret](#input\_equinix\_client\_secret) | API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX\_API\_CLIENTSECRET shell environment variable. | `string` | n/a | yes | | ||
| <a name="input_metro_code_primary"></a> [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes | | ||
| <a name="input_ssh_rsa_public_key"></a> [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes | | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|----------------------------------------------------------------------------------|------------------------| | ||
| <a name="output_device_details"></a> [device\_details](#output\_device\_details) | Virtual device details | | ||
|
||
<!-- END_TF_DOCS --> |
62 changes: 62 additions & 0 deletions
62
examples/Palo-Alto-Network-Firewall/pa-vm-firewall-cluster/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
provider "equinix" { | ||
client_id = var.equinix_client_id | ||
client_secret = var.equinix_client_secret | ||
} | ||
|
||
module "pa-vm-cluster" { | ||
source = "../../../modules/Palo-Alto-Network-Firewall" | ||
# version = "1.0.0" | ||
name = "tf-pa-vm-cluster" | ||
metro_code = var.metro_code_primary | ||
platform = "medium" | ||
account_number = "664566" | ||
software_package = "VM300" | ||
project_id = "e6be59d9-62c0-4140-aad6-150f0700203c" | ||
term_length = 1 | ||
notifications = ["[email protected]"] | ||
hostname = "pavm-pri" | ||
additional_bandwidth = 100 | ||
connectivity = "INTERNET-ACCESS" | ||
acl_template_id = equinix_network_acl_template.pa-vm-cluster-wan-acl.id | ||
mgmt_acl_template_uuid = equinix_network_acl_template.pa-vm-cluster-mgmt-acl.id | ||
ssh_key = { | ||
userName = "johndoe-primary" | ||
keyName = equinix_network_ssh_key.johndoe-pri.name | ||
} | ||
cluster = { | ||
enabled = true | ||
name = "test-pa-vm-cluster" | ||
node0_vendor_configuration_hostname = "node0" | ||
node1_vendor_configuration_hostname = "node1" | ||
} | ||
license_token = "I3372903" | ||
} | ||
|
||
resource "equinix_network_ssh_key" "johndoe-pri" { | ||
name = "johndoe-pri-0414-6" | ||
public_key = var.ssh_rsa_public_key | ||
project_id = "e6be59d9-62c0-4140-aad6-150f0700203c" | ||
} | ||
|
||
resource "equinix_network_acl_template" "pa-vm-cluster-mgmt-acl" { | ||
name = "tf-pa-vm-cluster-mgmt" | ||
description = "Primary Palo Alto Networks VM ACL template" | ||
project_id = "e6be59d9-62c0-4140-aad6-150f0700203c" | ||
inbound_rule { | ||
subnet = "12.16.103.0/24" | ||
protocol = "TCP" | ||
src_port = "any" | ||
dst_port = "22" | ||
} | ||
} | ||
|
||
resource "equinix_network_acl_template" "pa-vm-cluster-wan-acl" { | ||
name = "tf-pa-vm-cluster-wan" | ||
description = "Secondary Palo Alto Networks VM ACL template" | ||
inbound_rule { | ||
subnet = "172.16.25.0/24" | ||
protocol = "TCP" | ||
src_port = "any" | ||
dst_port = "22" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/Palo-Alto-Network-Firewall/pa-vm-firewall-cluster/outputs.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "device_details" { | ||
description = "Virtual device details" | ||
value = module.pa-vm-cluster | ||
} |
24 changes: 24 additions & 0 deletions
24
examples/Palo-Alto-Network-Firewall/pa-vm-firewall-cluster/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
variable "equinix_client_id" { | ||
type = string | ||
description = "API Consumer Key available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTID shell environment variable." | ||
} | ||
|
||
variable "equinix_client_secret" { | ||
type = string | ||
description = "API Consumer secret available under 'My Apps' in developer portal. This argument can also be specified with the EQUINIX_API_CLIENTSECRET shell environment variable." | ||
} | ||
|
||
variable "metro_code_primary" { | ||
description = "Device location metro code" | ||
type = string | ||
} | ||
|
||
variable "ssh_rsa_public_key" { | ||
description = "SSH RSA public key" | ||
type = string | ||
} | ||
|
||
variable "license_token" { | ||
description = "License Token" | ||
type = string | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/Palo-Alto-Network-Firewall/pa-vm-firewall-cluster/versions.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
equinix = { | ||
source = "equinix/equinix" | ||
version = "~> 1.34.0" | ||
} | ||
} | ||
} |
Oops, something went wrong.