View in Terraform Registry

Applications are the core of content delivery on the Azion Platform. They allow you to configure cache, processing rules, and integrate functions.


The Applications resources allow you to manage all aspects of your applications through Terraform.

Available Resources

Available Data Sources

Data SourceDescription
azion_application_main_settingsQuery main settings
azion_application_cache_settingsQuery cache settings
azion_application_rules_engineQuery rules

azion_application_main_setting

Basic Example

resource "azion_application_main_setting" "example" {
name = "my-application"
# Main configuration
}

Main Arguments

ArgumentTypeRequiredDescription
namestringYesApplication name

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


azion_application_cache_setting

Basic Example

resource "azion_application_cache_setting" "example" {
application_id = azion_application_main_setting.example.id
name = "my-cache-config"
# Cache configuration
}

azion_application_rule_engine

Basic Example

resource "azion_application_rule_engine" "example" {
application_id = azion_application_main_setting.example.id
name = "my-rule"
phase = "request"
# Criteria and behaviors
}

Complete Example

terraform {
required_providers {
azion = {
source = "aziontech/azion"
version = "2.0.0"
}
}
}
provider "azion" {
api_token = var.api_token
}
# Create main application
resource "azion_application_main_setting" "my_app" {
name = "my-application"
}
# Configure cache
resource "azion_application_cache_setting" "my_cache" {
application_id = azion_application_main_setting.my_app.id
name = "static-cache"
# Cache configuration
}
# Create rule in Rules Engine
resource "azion_application_rule_engine" "my_rule" {
application_id = azion_application_main_setting.my_app.id
name = "redirect-rule"
phase = "request"
# Criteria and behaviors
}
# Instantiate a function
resource "azion_application_functions_instance" "my_function" {
application_id = azion_application_main_setting.my_app.id
function_id = azion_function.my_function.id
# Instance configuration
}
output "application_id" {
value = azion_application_main_setting.my_app.id
}