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
| Resource | Description |
|---|---|
azion_connector | Creates and manages connectors |
Available Data Sources
| Data Source | Description |
|---|---|
azion_connectors | Query existing connectors |
azion_connector
Basic Example
resource "azion_connector" "example" { name = "my-connector"
# Connector configuration}Main Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique connector name |
For the complete list of arguments, see the Terraform Registry.
Exported Attributes
| Attribute | Type | Description |
|---|---|---|
id | string | Unique connector ID |
Complete Example
terraform { required_providers { azion = { source = "aziontech/azion" version = "2.0.0" } }}
provider "azion" { api_token = var.api_token}
# Create a connectorresource "azion_connector" "my_origin" { name = "my-origin"
# Origin configuration}
# Query existing connectorsdata "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
- Workloads - Manage workloads
- Applications - Manage applications