View in Terraform Registry

Connectors replace the concept of origins in API v4. They provide a flexible way to configure origins for your applications.


The azion_connector resource allows you to manage origin connectors through Terraform. Connectors define how your applications communicate with content origins.

Available Resources

ResourceDescription
azion_connectorCreates and manages connectors

Available Data Sources

Data SourceDescription
azion_connectorsQuery existing connectors

azion_connector

Basic Example

resource "azion_connector" "example" {
name = "my-connector"
# Connector configuration
}

Main Arguments

ArgumentTypeRequiredDescription
namestringYesUnique connector name

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

Exported Attributes

AttributeTypeDescription
idstringUnique connector ID

Complete Example

terraform {
required_providers {
azion = {
source = "aziontech/azion"
version = "2.0.0"
}
}
}
provider "azion" {
api_token = var.api_token
}
# Create a connector
resource "azion_connector" "my_origin" {
name = "my-origin"
# Origin configuration
}
# Query existing connectors
data "azion_connectors" "all" {}
output "connector_id" {
value = azion_connector.my_origin.id
}

Migrating from Origins (V3 to V4)

If you’re migrating from API v3, the azion_application_origin resource has been replaced by azion_connector.

Before (V3)

resource "azion_application_origin" "example" {
application_id = azion_application_main_setting.example.id
name = "my-origin"
origin_type = "single_origin"
origin_address = "origin.example.com"
origin_protocol = "https"
}

After (V4)

resource "azion_connector" "example" {
name = "my-connector"
# Connector configuration
}

See the Migration Guide for more details.


Next Steps