View in Terraform Registry

Protect your applications with Azion security resources. Manage firewall, WAF, and network lists through Terraform.


The security resources allow you to configure protection against threats, geolocation blocking, rate limiting, and much more.

Available Resources

ResourceDescription
azion_firewall_main_settingFirewall main settings
azion_firewall_functions_instanceFunction instances in firewall
azion_waf_rule_setWAF rule sets
azion_network_listNetwork lists (IPs, CIDRs, countries)

Available Data Sources

Data SourceDescription
azion_firewall_main_settingsQuery firewall settings
azion_firewall_function_instancesQuery function instances
azion_network_listsQuery network lists
azion_waf_rule_setsQuery WAF rule sets

azion_firewall_main_setting

Basic Example

resource "azion_firewall_main_setting" "example" {
name = "my-firewall"
active = true
# Activated modules
}

Main Arguments

ArgumentTypeRequiredDescription
namestringYesFirewall name
activeboolNoWhether the firewall is active

For the complete list of arguments, see the Terraform Registry.


azion_network_list

Basic Example

resource "azion_network_list" "blocked_ips" {
name = "blocked-ips"
list_type = "ip_cidr"
# List of IPs/CIDRs
}

Main Arguments

ArgumentTypeRequiredDescription
namestringYesList name
list_typestringYesList type (ip_cidr, countries, asns)

azion_waf_rule_set

Basic Example

resource "azion_waf_rule_set" "example" {
name = "my-waf-rules"
# WAF configuration
}

Complete Example

terraform {
required_providers {
azion = {
source = "aziontech/azion"
version = "2.0.0"
}
}
}
provider "azion" {
api_token = var.api_token
}
# Create network list for blocked IPs
resource "azion_network_list" "blocked_ips" {
name = "blocked-ips"
list_type = "ip_cidr"
}
# Create firewall
resource "azion_firewall_main_setting" "my_firewall" {
name = "my-firewall"
active = true
# Link to workload/application
}
# Create WAF rule set
resource "azion_waf_rule_set" "my_waf" {
name = "my-waf"
# WAF configuration
}
output "firewall_id" {
value = azion_firewall_main_setting.my_firewall.id
}