Skip to content

Latest commit

 

History

History
117 lines (78 loc) · 5.28 KB

File metadata and controls

117 lines (78 loc) · 5.28 KB
page_title stackit_cdn_distribution Data Source - stackit
subcategory
description CDN distribution data source schema. ~> This datasource 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 datasource 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

Optional:

  • blocked_countries (List of String) The configured countries where distribution of content is blocked

Read-Only:

  • backend (Attributes) The configured backend for the distribution (see below for nested schema)
  • optimizer (Attributes) Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience. (see below for nested schema)
  • redirects (Attributes) A wrapper for a list of redirect rules that allows for redirect settings on a 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:

  • bucket_url (String) The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
  • geofencing (Map of List of String) The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
  • origin_request_headers (Map of String) The configured type http origin request headers for the backend
  • origin_url (String) The configured backend type http for the distribution
  • region (String) The region where the bucket is hosted. Required if type is 'bucket'.
  • type (String) The configured backend type. Possible values are: http, bucket.

Nested Schema for config.optimizer

Read-Only:

  • enabled (Boolean)

Nested Schema for config.redirects

Read-Only:

  • rules (Attributes List) A list of redirect rules. The order of rules matters for evaluation (see below for nested schema)

Nested Schema for config.redirects.rules

Read-Only:

  • description (String) An optional description for the redirect rule
  • enabled (Boolean) A toggle to enable or disable the redirect rule. Default to true
  • matchers (Attributes List) A list of matchers that define when this rule should apply. At least one matcher is required (see below for nested schema)
  • rule_match_condition (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
  • status_code (Number) The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
  • target_url (String) The target URL to redirect to. Must be a valid URI

Nested Schema for config.redirects.rules.matchers

Read-Only:

  • value_match_condition (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
  • values (List of String) A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/" or "/img/*"

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