Feature: CDN distribution resource and data source (#786)

* add datasource

* finish data source

* implement resource

* add unit tests

* add examples

* acceptance test

* review comments

* review comments 2

---------

Co-authored-by: Malte Ehrlen <malte.ehrlen@freiheit.com>
This commit is contained in:
Malte Ehrlen 2025-04-29 16:59:07 +03:00 committed by GitHub
parent 3c20b7743f
commit 855d3040ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 1520 additions and 0 deletions

View file

@ -0,0 +1,5 @@
data "stackit_cdn_distribution" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
distribution_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

View file

@ -0,0 +1,11 @@
# Create a CDN distribution
resource "stackit_cdn_distribution" "example_distribution" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
config = {
backend = {
type = "http"
origin_url = "mybackend.onstackit.cloud"
}
regions = ["EN", "US", "ASIA", "AF", "SA"]
}
}