terraform-provider-stackitp.../docs/data-sources/cdn_distribution.md
Malte Ehrlen 855d3040ef
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>
2025-04-29 15:59:07 +02:00

2.8 KiB

page_title subcategory description
stackit_cdn_distribution Data Source - stackit CDN distribution data source schema. ~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.

stackit_cdn_distribution (Data Source)

CDN distribution data source schema.

~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide for how to opt-in to use beta resources.

Example Usage

data "stackit_cdn_distribution" "example" {
  project_id      = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  distribution_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Schema

Required

  • distribution_id (String) STACKIT project ID associated with the distribution
  • project_id (String) STACKIT project ID associated with the distribution

Read-Only

  • config (Attributes) The distribution configuration (see below for nested schema)
  • created_at (String) Time when the distribution was created
  • domains (Attributes List) List of configured domains for the distribution (see below for nested schema)
  • errors (List of String) List of distribution errors
  • id (String) Terraform's internal resource identifier. It is structured as "project_id,distribution_id".
  • status (String) Status of the distribution
  • updated_at (String) Time when the distribution was last updated

Nested Schema for config

Read-Only:

  • backend (Attributes) The configured backend for the distribution (see below for nested schema)
  • regions (List of String) The configured regions where content will be hosted

Nested Schema for config.backend

Read-Only:

  • origin_request_headers (Map of String) The configured origin request headers for the backend
  • origin_url (String) The configured backend type for the distribution
  • type (String) The configured backend type

Nested Schema for domains

Read-Only:

  • errors (List of String) List of domain errors
  • name (String) The name of the domain
  • status (String) The status of the domain
  • type (String) The type of the domain. Each distribution has one domain of type "managed", and domains of type "custom" may be additionally created by the user