UI Deployment
Overview
This guide walks you through configuring the autoscale_template using the Web UI. This template deploys FortiGate autoscale groups with Gateway Load Balancer for elastic scaling.
Warning
Prerequisites:
- Deploy existing_vpc_resources first with AutoScale Deployment mode enabled
- Record the
cp,env, andtgw_namevalues from existing_vpc_resources outputs
Step 1: Select Template
- Open the UI at http://localhost:3000
- In the Template dropdown at the top, select autoscale_template
- The form will load with inherited values from existing_vpc_resources
{{% notice note %}} TODO: Add diagram - template-dropdown-autoscale
Show dropdown with “autoscale_template” selected {{% /notice %}}
Info
Configuration Inheritance
The UI automatically inherits cp, env, aws_region, and other base settings from existing_vpc_resources. These fields will be pre-filled and shown as “Inherited from existing_vpc_resources”.
Step 2: Verify Inherited Values
Review the inherited values (shown with gray background):
- Customer Prefix (cp) - Should match existing_vpc_resources
- Environment (env) - Should match existing_vpc_resources
- AWS Region - Should match existing_vpc_resources
- Availability Zones - Should match existing_vpc_resources
Warning
Do Not Change Inherited Values
These values must match existing_vpc_resources for proper resource discovery. If they’re incorrect, fix them in existing_vpc_resources first.
{{% notice note %}} TODO: Add diagram - inherited-fields
Show form fields with gray background indicating inherited values:
- cp: “acme” (inherited)
- env: “test” (inherited)
- aws_region: “us-west-2” (inherited)
- Note explaining these are read-only {{% /notice %}}
Step 3: Firewall Policy Mode
Choose how FortiGate processes traffic:
1-Arm Mode (Hairpin)
- Traffic enters and exits same interface
- Simplest configuration
- Single data plane interface
2-Arm Mode (Traditional)
- Separate untrusted and trusted interfaces
- Traditional firewall model
- Better performance for high throughput
Select: 1-arm or 2-arm from dropdown
{{% notice note %}} TODO: Add diagram - firewall-policy-mode
Show dropdown with options:
- 1-arm - Single interface (hairpin)
- 2-arm - Separate untrusted/trusted interfaces {{% /notice %}}
Step 4: FortiGate Configuration
Instance Type
- Select FortiGate Instance Type from dropdown:
- c5n.xlarge - 4 vCPU / 10.5GB RAM (minimum)
- c5n.2xlarge - 8 vCPU / 21GB RAM
- c5n.4xlarge - 16 vCPU / 42GB RAM
- c5n.9xlarge - 36 vCPU / 96GB RAM
FortiOS Version
- Enter FortiOS Version (e.g.,
7.4.5or7.6)
Admin Password
- Enter FortiGate Admin Password
- Minimum 8 characters
- Used to login to FortiGate instances
{{% notice note %}} TODO: Add diagram - fortigate-config
Show:
- Instance Type dropdown: “c5n.xlarge” selected
- FortiOS Version field: “7.4.5”
- Admin Password field: [password masked] {{% /notice %}}
Step 5: Autoscale Group Settings
Desired Capacity
- Enter Desired Capacity - Number of FortiGates to maintain (default: 2)
Minimum Size
- Enter Minimum Size - Minimum FortiGates in group (default: 2)
Maximum Size
- Enter Maximum Size - Maximum FortiGates in group (default: 6)
Scale-In Protection
- Check Enable Scale-In Protection to prevent automatic instance termination
{{% notice note %}} TODO: Add diagram - autoscale-settings
Show:
- Desired Capacity: 2
- Minimum Size: 2
- Maximum Size: 6
- Scale-In Protection checkbox {{% /notice %}}
Tip
Autoscaling Recommendations
- Start with desired capacity = 2 for testing
- Set maximum based on expected peak load
- Enable scale-in protection during initial testing
Step 6: Licensing Configuration
Choose ONE licensing mode:
PAYG (Pay-As-You-Go)
- Select License Type:
payg - No additional fields required
- AWS Marketplace billing applies
BYOL (Bring Your Own License)
- Select License Type:
byol - Upload license files to
terraform/aws/autoscale_template/asg_license/:cp license1.lic terraform/aws/autoscale_template/asg_license/ cp license2.lic terraform/aws/autoscale_template/asg_license/ # Add as many licenses as your maximum ASG size - Lambda will apply licenses automatically on instance launch
FortiFlex
- Select License Type:
fortiflex - Enter FortiFlex Token
- Lambda retrieves licenses from FortiFlex automatically
{{% notice note %}} TODO: Add diagram - licensing
Show:
- License Type dropdown with three options: payg, byol, fortiflex
- FortiFlex Token field (visible when fortiflex selected)
- Help text explaining each licensing mode {{% /notice %}}
Step 7: Transit Gateway Integration (Optional)
If you enabled Transit Gateway in existing_vpc_resources:
Enable TGW Attachment
- Check Enable Transit Gateway Attachment
- Enter Transit Gateway Name from existing_vpc_resources outputs
- Example:
acme-test-tgw - Find with:
terraform output tgw_name
- Example:
{{% notice note %}} TODO: Add diagram - tgw-integration
Show:
- Enable TGW Attachment checkbox [[x]]
- Transit Gateway Name field: “acme-test-tgw”
- Help text: “Use ’tgw_name’ from existing_vpc_resources outputs” {{% /notice %}}
Info
TGW Routing
When enabled, the template automatically:
- Creates TGW attachment for inspection VPC
- Updates spoke VPC route tables to point to inspection VPC
- Enables east-west and north-south traffic inspection
Step 8: Distributed Inspection (Optional)
If you want GWLB endpoints in distributed spoke VPCs:
- Check Enable Distributed Inspection
- The template will discover VPCs tagged with your
cpandenvvalues - GWLB endpoints will be created in discovered VPCs
{{% notice note %}} TODO: Add diagram - distributed-inspection
Show:
- Enable Distributed Inspection checkbox
- Help text explaining bump-in-the-wire inspection
- Diagram: VPC –> GWLBe –> GWLB –> GENEVE –> FortiGate {{% /notice %}}
Info
Distributed vs Centralized
- Centralized (TGW): Traffic flows through TGW to inspection VPC
- Distributed: GWLB endpoints placed directly in spoke VPCs
- Both can be enabled simultaneously
Step 9: Internet Access Mode
Choose how FortiGates access the internet:
EIP Mode (Default)
- Select Access Internet Mode:
eip - Each FortiGate gets an Elastic IP
- Distributed egress from each instance
NAT Gateway Mode
- Select Access Internet Mode:
nat_gw - Centralized egress through NAT Gateways
- Requires NAT Gateways in inspection VPC
{{% notice note %}} TODO: Add diagram - internet-access
Show dropdown with options:
- eip - Elastic IP per instance (distributed egress)
- nat_gw - NAT Gateway (centralized egress) {{% /notice %}}
Step 10: Management Configuration
Choose management access mode:
Standard Management (Default)
- Management via data plane interfaces
- No additional ENIs required
- Simplest configuration
Dedicated Management ENI
- Check Enable Dedicated Management ENI
- Converts port2 to dedicated management interface (instead of data plane)
- Better security isolation
Dedicated Management VPC
- Check Enable Dedicated Management VPC
- Management interfaces in separate management VPC
- Requires existing_vpc_resources with management VPC enabled
- Maximum security isolation
{{% notice note %}} TODO: Add diagram - management-config
Show:
- Enable Dedicated Management ENI checkbox
- Enable Dedicated Management VPC checkbox
- Help text explaining security isolation {{% /notice %}}
Step 11: FortiManager Integration (Optional)
If you deployed FortiManager in existing_vpc_resources:
- Check Enable FortiManager
- Enter FortiManager IP from existing_vpc_resources outputs
- Example:
10.3.0.10 - Find with:
terraform output fortimanager_private_ip
- Example:
- Enter FortiManager Serial Number
- Login to FortiManager CLI:
get system status
- Login to FortiManager CLI:
{{% notice note %}} TODO: Add diagram - fortimanager-integration
Show:
- Enable FortiManager checkbox [[x]]
- FortiManager IP field: “10.3.0.10”
- Serial Number field
- Help text: “Get from existing_vpc_resources outputs” {{% /notice %}}
Info
FortiManager Registration
When enabled:
- FortiGate instances automatically register with FortiManager on launch
- Lambda handles authorization
- ADOM configuration optional
Step 12: FortiAnalyzer Integration (Optional)
If you deployed FortiAnalyzer in existing_vpc_resources:
- Check Enable FortiAnalyzer
- Enter FortiAnalyzer IP from existing_vpc_resources outputs
- Example:
10.3.0.11 - Find with:
terraform output fortianalyzer_private_ip
- Example:
{{% notice note %}} TODO: Add diagram - fortianalyzer-integration
Show:
- Enable FortiAnalyzer checkbox [[x]]
- FortiAnalyzer IP field: “10.3.0.11” {{% /notice %}}
Step 13: Security Configuration
EC2 Key Pair
- Select Key Pair from dropdown (should match existing_vpc_resources)
Management CIDR
- Management CIDR list is inherited from existing_vpc_resources
- Shows list of allowed IP ranges for SSH/HTTPS access
- Cannot be modified here (inherited)
{{% notice note %}} TODO: Add diagram - security-config-autoscale
Show:
- Key Pair dropdown: “my-keypair” (inherited)
- Management CIDR list field: [“203.0.113.10/32”] (inherited, read-only) {{% /notice %}}
Step 14: Save Configuration
- Click the Save Configuration button
- Confirmation: “Configuration saved successfully!”
{{% notice note %}} TODO: Add diagram - save-autoscale
Show Save Configuration button with success message {{% /notice %}}
Step 15: Generate terraform.tfvars
- Click Generate terraform.tfvars
- Review the generated configuration in preview window
- Verify all settings are correct
{{% notice note %}} TODO: Add diagram - generated-preview-autoscale
Show preview window with generated terraform.tfvars content {{% /notice %}}
Step 16: Download or Save to Template
Option A: Download
- Click Download
- File saves as
autoscale_template.tfvars - Copy to terraform directory:
cp ~/Downloads/autoscale_template.tfvars \ terraform/aws/autoscale_template/terraform.tfvars
Option B: Save Directly
- Click Save to Template
- Confirmation: “terraform.tfvars saved to: terraform/aws/autoscale_template/terraform.tfvars”
Step 17: Deploy with Terraform
cd terraform/aws/autoscale_template
# Initialize Terraform
terraform init
# Review execution plan
terraform plan
# Deploy infrastructure
terraform applyType yes when prompted.
Expected deployment time: 15-20 minutes
Common Configuration Patterns
Pattern 1: Simple Autoscale with TGW
Firewall Policy Mode: 1-arm
License Type: payg
[x] Enable Transit Gateway Attachment
[ ] Enable Distributed Inspection
[ ] Enable Dedicated Management ENI
[ ] Enable FortiManager
Desired Capacity: 2
Minimum Size: 2
Maximum Size: 4Use case: Basic autoscaling with centralized inspection via TGW
Pattern 2: Distributed Inspection
Firewall Policy Mode: 2-arm
License Type: byol
[ ] Enable Transit Gateway Attachment
[x] Enable Distributed Inspection
[ ] Enable Dedicated Management ENI
[ ] Enable FortiManager
Desired Capacity: 2
Minimum Size: 2
Maximum Size: 6Use case: Bump-in-the-wire inspection in distributed spoke VPCs
Pattern 3: Full Management with FortiManager
Firewall Policy Mode: 2-arm
License Type: payg
[x] Enable Transit Gateway Attachment
[ ] Enable Distributed Inspection
[x] Enable Dedicated Management VPC
[x] Enable FortiManager
[x] Enable FortiAnalyzer
Desired Capacity: 2
Minimum Size: 2
Maximum Size: 6Use case: Production-like environment with centralized management
Validation and Errors
The UI validates:
- FortiGate admin password minimum length (8 characters)
- Autoscale group sizes (min <= desired <= max)
- FortiManager IP format
- Transit Gateway name format
- All required fields filled
{{% notice note %}} TODO: Add diagram - validation-errors-autoscale
Show form with validation errors highlighted {{% /notice %}}
Next Steps
After deploying autoscale_template:
Verify deployment:
terraform outputAccess FortiGate:
- Get load balancer DNS from outputs
- GUI:
https://<load-balancer-dns> - Username:
admin - Password:
<fortigate_asg_password>
Test traffic flow:
- From spoke VPC instances, test internet connectivity
- Verify traffic appears in FortiGate logs
- Test east-west traffic between spoke VPCs
Monitor autoscaling:
- Check CloudWatch metrics
- Review Lambda logs
- Monitor ASG activity
Troubleshooting
FortiGates Not Joining FortiManager
Check:
- FortiManager IP is correct
- FortiManager serial number is correct
- Security groups allow traffic between inspection VPC and management VPC
- FortiManager has
fgfm-allow-vm enableset
License Application Failed
Check:
- License files are in
asg_license/directory - Sufficient licenses for maximum ASG size
- FortiFlex token is valid (if using FortiFlex)
- Lambda logs for error messages
No Traffic Flowing Through FortiGates
Check:
- TGW route tables point to inspection VPC attachment
- Security groups allow traffic on FortiGate interfaces
- FortiGate firewall policies exist and allow traffic
- Gateway Load Balancer health checks passing