From 45cea9236d93534b6c1ad148211b7c8d320878f8 Mon Sep 17 00:00:00 2001 From: Rui Ling <82846950+rling-equinix@users.noreply.github.com> Date: Mon, 17 Jun 2024 12:40:08 -0700 Subject: [PATCH] feat: add fortinet firewall module README files --- examples/fg-vm-cluster/README.md | 67 +++++++++++++++++++++ examples/fg-vm-ha/README.md | 65 ++++++++++++++++++++ examples/fg-vm-single/README.md | 64 ++++++++++++++++++++ modules/fortigate-firewall/README.md | 90 ++++++++++++++++++++++++++++ 4 files changed, 286 insertions(+) create mode 100644 examples/fg-vm-cluster/README.md create mode 100644 examples/fg-vm-ha/README.md create mode 100644 examples/fg-vm-single/README.md create mode 100644 modules/fortigate-firewall/README.md diff --git a/examples/fg-vm-cluster/README.md b/examples/fg-vm-cluster/README.md new file mode 100644 index 0000000..7ef258d --- /dev/null +++ b/examples/fg-vm-cluster/README.md @@ -0,0 +1,67 @@ +# Network Edge Fortinet FortiGate Firewall Cluster Device Example + +This example demonstrates creation of Network Edge Fortinet FortiGate Firewall cluster device. It will: + +- Create an ACL template +- Create an SSH key +- Creae two license files +- Provision Fortinet FortiGate Firewall cluster device + +## 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/fg-vm-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. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.3 | +| [equinix](#requirement\_equinix) | >= 1.34 | + +## Providers + +| Name | Version | +|------|---------| +| [equinix](#provider\_equinix) | >= 1.34 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [fg\_vm\_cluster](#module\_fg\_vm\_cluster) | ../../modules/fortigate-firewall | n/a | + +## Resources + +| Name | Type | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------|------| +| [equinix_network_acl_template.fortigate_cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template) | resource | +| [equinix_network_file.fg_vm_license_file_node0](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_file) | resource | +| [equinix_network_file.fg_vm_license_file_node1](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_file) | resource | +| [equinix_network_ssh_key.johndoe_cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_ssh_key) | resource | +| [equinix_network_device_type.fg_vm_type](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_type) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [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 | +| [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 | +| [metro\_code\_cluster](#input\_metro\_code\_cluster) | Device location metro code | `string` | n/a | yes | +| [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [device\_details](#output\_device\_details) | Virtual device details | + diff --git a/examples/fg-vm-ha/README.md b/examples/fg-vm-ha/README.md new file mode 100644 index 0000000..4ce2c9d --- /dev/null +++ b/examples/fg-vm-ha/README.md @@ -0,0 +1,65 @@ +# Network Edge Fortinet FortiGate Firewall HA Device Example + +This example demonstrates creation of Network Edge Fortinet FortiGate Firewall HA device. It will: + +- Create two ACL templates +- Create an SSH key +- Provision Fortinet FortiGate Firewall HA device + +## 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/fg-vm-ha +terraform init +terraform apply +``` + +Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.3 | +| [equinix](#requirement\_equinix) | >= 1.34 | + +## Providers + +| Name | Version | +|------|---------| +| [equinix](#provider\_equinix) | >= 1.34 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [fg\_vm\_ha](#module\_fg\_vm\_ha) | ../../modules/fortigate-firewall | n/a | + +## Resources + +| Name | Type | +|----------------------------------------------------------------------------------------------------------------------------------------------------------|------| +| [equinix_network_acl_template.fortigate_pri](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template) | resource | +| [equinix_network_acl_template.fortigate_sec](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 | +|------|-------------|------|---------|:--------:| +| [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 | +| [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 | +| [metro\_code\_primary](#input\_metro\_code\_primary) | Primary device location metro code | `string` | n/a | yes | +| [metro\_code\_secondary](#input\_metro\_code\_secondary) | Secondary device location metro code | `string` | n/a | yes | +| [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [device\_details](#output\_device\_details) | Virtual device details | + diff --git a/examples/fg-vm-single/README.md b/examples/fg-vm-single/README.md new file mode 100644 index 0000000..4876c95 --- /dev/null +++ b/examples/fg-vm-single/README.md @@ -0,0 +1,64 @@ +# Network Edge Fortinet FortiGate Firewall Single Device Example + +This example demonstrates creation of Network Edge Fortinet FortiGate Firewall Single device. It will: + +- Create an ACL template +- Create an SSH key +- Provision Fortinet FortiGate Firewall Single device + +## 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/fg-vm-single +terraform init +terraform apply +``` + +Note that this example may create resources which cost money. Run 'terraform destroy' when you don't need these resources. + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.3 | +| [equinix](#requirement\_equinix) | >= 1.34 | + +## Providers + +| Name | Version | +|------|---------| +| [equinix](#provider\_equinix) | >= 1.34 | + +## Modules + +| Name | Source | Version | +|------|--------|---------| +| [fg\_vm\_single](#module\_fg\_vm\_single) | ../../modules/fortigate-firewall | n/a | + +## Resources + +| Name | Type | +|----------------------------------------------------------------------------------------------------------------------------------------------------------|------| +| [equinix_network_acl_template.fortigate_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 | +| [equinix_network_account.test_account](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_account) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [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 | +| [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 | +| [metro\_code\_primary](#input\_metro\_code\_primary) | Device location metro code | `string` | n/a | yes | +| [ssh\_rsa\_public\_key](#input\_ssh\_rsa\_public\_key) | SSH RSA public key | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| [device\_details](#output\_device\_details) | Virtual device details | + diff --git a/modules/fortigate-firewall/README.md b/modules/fortigate-firewall/README.md new file mode 100644 index 0000000..0143ed0 --- /dev/null +++ b/modules/fortigate-firewall/README.md @@ -0,0 +1,90 @@ +# Network Edge Virtual Device Fortinet FortiGate Firewall SubModule + +The Network Edge Virtual Device Fortinet FortiGate Firewall Module will create Fortinet FortiGate firewall devices on the Equinix +Network Edge platform. + +1. Single or Non HA device +2. HA devices +3. Cluster devices + +Please refer to the fg-vm-* examples in this module's registry for more details on how to leverage the +submodule. + + + +## Equinix Network Edge Developer Documentation + +To see the documentation for the APIs that the Network Edge Terraform Provider is built on +and to learn how to procure your own Client_Id and Client_Secret follow the link below: +[Equinix Network Edge Developer Portal](https://developer.equinix.com/catalog/network-edgev1) + + + +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.3 | +| [equinix](#requirement\_equinix) | >= 1.34.0 | + +## Providers + +| Name | Version | +|------|---------| +| [equinix](#provider\_equinix) | >= 1.34.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|----------------------------------------------------------------------------------------------------------------------------------------------------------|------| +| [equinix_network_device.cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_device) | resource | +| [equinix_network_device.non_cluster](https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_device) | resource | +| [equinix_network_device_platform.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_platform) | data source | +| [equinix_network_device_software.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_software) | data source | +| [equinix_network_device_type.this](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_type) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|---------|:--------:| +| [account\_number](#input\_account\_number) | Billing account number for a device | `string` | n/a | yes | +| [acl\_template\_id](#input\_acl\_template\_id) | Identifier of an ACL template that will be applied on a device | `string` | n/a | yes | +| [metro\_code](#input\_metro\_code) | Device location metro code. Please refer to [available metros](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-metros.htm) | `string` | n/a | yes | +| [name](#input\_name) | Device name | `string` | n/a | yes | +| [notifications](#input\_notifications) | List of email addresses that will receive device status notifications | `list(string)` | n/a | yes | +| [platform](#input\_platform) | Device platform flavor that determines number of CPU cores and memory | `string` | n/a | yes | +| [software\_package](#input\_software\_package) | Device software package. Use [equinix_network_device_software](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_software) data source with device type code to find the supported package codes | `string` | n/a | yes | +| [ssh\_key](#input\_ssh\_key) | SSH public key for a device |
object({
username = string
key_name = string
})
| n/a | yes | +| [term\_length](#input\_term\_length) | Term length in months | `number` | n/a | yes | +| [additional\_bandwidth](#input\_additional\_bandwidth) | Additional internet bandwidth for a device | `number` | `0` | no | +| [cluster](#input\_cluster) | Cluster device attributes |
object({
enabled = bool
name = string
node0 = object({
vendor_configuration = object({
hostname = string
})
license_file_id = optional(string)
license_token = optional(string)
})
node1 = object({
vendor_configuration = object({
hostname = string
})
license_file_id = optional(string)
license_token = optional(string)
})
})
|
{
"enabled": false,
"name": null,
"node0": {
"license_file_id": null,
"license_token": null,
"vendor_configuration": {
"hostname": null
}
},
"node1": {
"license_file_id": null,
"license_token": null,
"vendor_configuration": {
"hostname": null
}
}
}
| no | +| [hostname](#input\_hostname) | Device hostname prefix | `string` | `null` | no | +| [interface\_count](#input\_interface\_count) | Number of network interfaces on a device | `number` | `10` | no | +| [license\_file](#input\_license\_file) | Path to the device license file | `string` | `null` | no | +| [license\_token](#input\_license\_token) | License token | `string` | `null` | no | +| [project\_id](#input\_project\_id) | Unique identifier for the project resource where the device is scoped to | `string` | `null` | no | +| [secondary](#input\_secondary) | Secondary device attributes |
object({
enabled = bool
name = string
hostname = string
metro_code = string
license_token = optional(string)
license_file = optional(string)
account_number = string
notifications = list(string)
additional_bandwidth = optional(number)
acl_template_id = string
})
|
{
"account_number": null,
"acl_template_id": null,
"additional_bandwidth": null,
"enabled": false,
"hostname": null,
"license_file": null,
"license_token": null,
"metro_code": null,
"name": null,
"notifications": null
}
| no | +| [version\_number](#input\_version\_number) | Device software package version number. Please refer to [certified VNF versions](https://docs.equinix.com/en-us/Content/Interconnection/NE/user-guide/NE-certified-VNFs.htm) document for the supported versions. If this value is not passed most recent and stable version will be used by invoking [equinix_network_device_software](https://registry.terraform.io/providers/equinix/equinix/latest/docs/data-sources/equinix_network_device_software) data source | `string` | `""` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| [account\_number](#output\_account\_number) | Device billing account number | +| [cpu\_count](#output\_cpu\_count) | Device CPU cores count | +| [ibx](#output\_ibx) | Device IBX center | +| [id](#output\_id) | Device identifier | +| [interfaces](#output\_interfaces) | Device interfaces | +| [license\_status](#output\_license\_status) | Device license status | +| [memory](#output\_memory) | Device memory amount | +| [region](#output\_region) | Device region | +| [secondary](#output\_secondary) | Secondary device attributes | +| [software\_version](#output\_software\_version) | Device software version | +| [ssh\_ip\_address](#output\_ssh\_ip\_address) | Device SSH interface IP address | +| [ssh\_ip\_fqdn](#output\_ssh\_ip\_fqdn) | Device SSH interface FQDN | +| [status](#output\_status) | Device provisioning status | +