terraform-provider-stackitp.../examples/resources/stackit_cdn_distribution/resource.tf
Politano f0433984f4
cdn add geofence feature (#1020)
* add geofencing attribute to "stackit_cdn_distribution"
2025-10-15 08:56:47 +00:00

24 lines
No EOL
657 B
HCL

resource "stackit_cdn_distribution" "example_distribution" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
config = {
backend = {
type = "http"
origin_url = "https://mybackend.onstackit.cloud"
geofencing = {
"https://mybackend.onstackit.cloud" = ["DE"]
}
}
regions = ["EU", "US", "ASIA", "AF", "SA"]
blocked_countries = ["DE", "AT", "CH"]
optimizer = {
enabled = true
}
}
}
# Only use the import statement, if you want to import an existing cdn distribution
import {
to = stackit_cdn_distribution.import-example
id = "${var.project_id},${var.distribution_id}"
}