Skip to content

Jackmeson1/fortiproxy-terraform

Β 
Β 

Repository files navigation

πŸš€ FortiProxy Terraform Deployment Scripts

Terraform Azure AWS FortiProxy License

Enterprise-grade Infrastructure as Code (IaC) templates for automated FortiProxy Web Application Firewall deployment across AWS and Azure cloud platforms

🌟 Overview

Deploy Fortinet FortiProxy - the industry-leading Web Application Firewall (WAF) and SSL VPN solution - instantly across cloud environments using Terraform Infrastructure as Code. This repository provides production-ready, enterprise-tested deployment templates for both single-instance and high-availability configurations.

🎯 Why Choose This Repository?

  • βœ… Multi-Cloud Support: Deploy on Azure and AWS with identical configurations
  • βœ… Version Flexibility: Support for FortiProxy 7.2, 7.4, and 7.6
  • βœ… Deployment Options: Single-instance and HA active-passive clusters
  • βœ… Production-Ready: Enterprise-tested templates with security best practices
  • βœ… Infrastructure as Code: Version-controlled, repeatable deployments
  • βœ… Zero-Downtime HA: Cross-zone high availability configurations
  • βœ… Easy Customization: Modular design with comprehensive variable support
  • βœ… Authentication Testing: Complete AD integration with Ubuntu client for Kerberos/LDAP testing

πŸ—οΈ Architecture Support

πŸ”§ Deployment Types

Deployment Type Description Use Case Availability Zones
Single Instance Standalone FortiProxy deployment Development, Testing, POC Single Zone
HA Active-Passive High-availability cluster Production, Critical workloads Cross-Zone
HA with Management HA cluster with dedicated mgmt Enterprise, Compliance Cross-Zone
AD + Client Environment Windows AD + Ubuntu client Authentication Testing, LDAP/Kerberos Cross-Zone

☁️ Cloud Platform Support

Microsoft Azure

  • Regions: All Azure regions with availability zone support
  • VM Sizes: Standard_F4, Standard_B4ms, and larger
  • Networking: VNet with multiple subnets, NSGs, Load Balancers
  • Storage: Managed disks with diagnostics

Amazon Web Services (AWS)

  • Regions: All AWS regions with Multi-AZ support
  • Instance Types: M5, C5, and T3 families
  • Networking: VPC with public/private subnets, Security Groups
  • Storage: EBS volumes with CloudWatch integration

πŸš€ Quick Start Guide

Prerequisites

  1. Terraform β‰₯ 1.0 installed (Download)
  2. Cloud CLI configured:
  3. FortiProxy BYOL License (for production deployments)

πŸ“¦ Repository Structure

fortiproxy-terraform/
β”œβ”€β”€ azure/
β”‚   β”œβ”€β”€ 7.2/
β”‚   β”‚   β”œβ”€β”€ single/                    # Single instance deployment
β”‚   β”‚   └── ha-ap-port1-mgmt-crosszone/ # HA cluster deployment
β”‚   β”œβ”€β”€ 7.4/
β”‚   β”‚   β”œβ”€β”€ single/                    # Single instance deployment
β”‚   β”‚   └── ha-ap-port1-mgmt-crosszone/ # HA cluster deployment
β”‚   β”œβ”€β”€ 7.6/
β”‚   β”‚   β”œβ”€β”€ single/                    # Single instance deployment
β”‚   β”‚   └── ha-ap-port1-mgmt-crosszone/ # HA cluster deployment
β”‚   └── win2019-ad/                    # Windows Server 2019 AD + Ubuntu client for authentication testing
β”œβ”€β”€ aws/
β”‚   └── 7.0/
β”‚       └── ha-active-passive/         # AWS HA deployment
└── CLAUDE.md                          # AI-assisted development guide

🎯 Deploy Your First FortiProxy

Azure Single Instance (Recommended for beginners)

# 1. Clone the repository
git clone https://github.com/fortinet/fortiproxy-terraform.git
cd fortiproxy-terraform/azure/7.6/single

# 2. Configure your deployment
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your Azure credentials and preferences

# 3. Deploy with Terraform
terraform init
terraform plan
terraform apply

# 4. Access your FortiProxy
# URL, username, and password will be displayed after deployment

Azure High Availability Cluster

# Navigate to HA deployment
cd fortiproxy-terraform/azure/7.6/ha-ap-port1-mgmt-crosszone

# Configure and deploy
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your configuration
terraform init
terraform plan
terraform apply

πŸ”§ Configuration Options

Essential Variables

Variable Description Example Required
subscription_id Azure Subscription ID 12345678-1234-... βœ…
client_id Azure Service Principal ID 87654321-4321-... βœ…
location Azure region eastus2, westeurope βœ…
fpxversion FortiProxy version 7.6.0, 7.4.4 βœ…
license License file path ./license.lic βœ…
size VM size Standard_F4s_v2 ⚠️

Advanced Customization

# terraform.tfvars example
subscription_id = "your-subscription-id"
client_id       = "your-client-id"
client_secret   = "your-client-secret"
tenant_id       = "your-tenant-id"

# Deployment customization
location = "eastus2"
size     = "Standard_F4s_v2"
fpxversion = "7.6.0"

# Network configuration
vnetcidr    = "172.16.0.0/16"
publiccidr  = "172.16.0.0/24"
privatecidr = "172.16.1.0/24"

# License files
license  = "./license-active.lic"
license2 = "./license-passive.lic"

πŸ“š Deployment Scenarios

🏒 Enterprise Production

Scenario: High-traffic web application protection Recommended: Azure 7.6 HA Active-Passive

cd azure/7.6/ha-ap-port1-mgmt-crosszone
# Configure for Standard_F8s_v2 or larger
# Enable all security features

πŸ§ͺ Development & Testing

Scenario: Application development and testing Recommended: Azure 7.6 Single Instance

cd azure/7.6/single
# Configure for Standard_B4ms (cost-effective)
# Simplified configuration

πŸ”’ Compliance & Security

Scenario: Regulated industries, PCI-DSS compliance Recommended: Azure 7.6 HA with Active Directory

cd azure/7.6/ha-ap-port1-mgmt-crosszone
cd ../win2019-ad  # Deploy AD for authentication
# Configure LDAP/RADIUS integration

πŸ§ͺ Authentication Testing

Scenario: Testing FortiProxy LDAP/Kerberos authentication Recommended: Azure AD + Ubuntu Client Environment

cd azure/win2019-ad
# Complete testing environment with:
# - Windows Server 2019 Active Directory
# - Ubuntu 20.04 client with Kerberos/LDAP tools
# - Pre-configured test users and scripts
# - Comprehensive authentication testing suite

πŸ›‘οΈ Security Best Practices

πŸ” Network Security

  • Default Deny: All NSGs/Security Groups use explicit allow rules
  • Segmentation: Separate management and data plane networks
  • Encryption: All traffic encrypted in transit and at rest
  • Monitoring: Built-in logging and diagnostics

🚨 Operational Security

  • Secrets Management: Use Azure Key Vault or AWS Secrets Manager
  • Access Control: Implement RBAC with least privilege
  • Monitoring: Enable Azure Monitor or CloudWatch integration
  • Backup: Automated configuration backups

πŸ” Troubleshooting

Common Issues & Solutions

❌ VM Size Not Available

Error: SkuNotAvailable: Standard_F4 not available in westus2

Solution: Use different VM size or region:

size = "Standard_B4ms"
location = "eastus2"

❌ License File Not Found

Error: no file exists at "license.txt"

Solution: Create placeholder or provide valid license:

echo "# Placeholder license" > license.txt

❌ Network Interface Reserved

Error: NicReservedForAnotherVm

Solution: Wait 3 minutes and retry terraform destroy

πŸ“ž Getting Help

  1. Documentation: Check individual README files in deployment folders
  2. Community: FortiProxy Documentation
  3. Issues: GitHub Issues
  4. Commercial Support: Contact Fortinet Support

πŸ§ͺ Testing & Validation

Automated Testing

# Validate Terraform configuration
terraform validate

# Check security compliance
tfsec .

# Test deployment (dry-run)
terraform plan -out=plan.tfplan

Manual Validation

  • βœ… Web GUI accessible via HTTPS
  • βœ… SSH access to management interface
  • βœ… HA synchronization (for cluster deployments)
  • βœ… Log forwarding to SIEM systems

🀝 Contributing

We welcome contributions! Here's how you can help:

  1. πŸ› Report Bugs: Use GitHub Issues for bug reports
  2. πŸ’‘ Feature Requests: Suggest new deployment scenarios
  3. πŸ“ Documentation: Improve README files and examples
  4. πŸ”§ Code: Submit pull requests for enhancements

Development Workflow

# Fork and clone the repository
git clone https://github.com/yourusername/fortiproxy-terraform.git

# Create feature branch
git checkout -b feature/new-deployment-type

# Make changes and test
terraform validate
terraform plan

# Submit pull request
git push origin feature/new-deployment-type

πŸ“ˆ Roadmap

Upcoming Features

  • 🎯 FortiProxy 7.8 support
  • 🎯 Google Cloud Platform deployments
  • 🎯 Kubernetes integration
  • 🎯 Ansible automation playbooks
  • 🎯 CI/CD pipeline templates

Version History

  • v3.0 (Current): FortiProxy 7.6 support, single deployments
  • v2.0: FortiProxy 7.4 support, enhanced HA
  • v1.0: Initial release with FortiProxy 7.2

πŸ“„ License & Support

πŸ“œ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

🏒 Support Policy

Fortinet-provided scripts in this and other GitHub projects do not fall under the regular Fortinet technical support scope and are not supported by FortiCare Support Services.


🌟 Star this repository if it helped you! 🌟

GitHub stars GitHub forks

Made with ❀️ by the Fortinet Community

πŸ”— Fortinet.com | πŸ“š Documentation | πŸ’¬ Community

About

Terraform deployment code for FPX on cloud platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 54.1%
  • Shell 27.7%
  • PowerShell 18.2%