1. Packages
  2. Packages
  3. stackit
  4. API Docs
  5. getCdnDistribution
Viewing docs for stackit v0.0.6
published on Wednesday, May 6, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.6
published on Wednesday, May 6, 2026 by stackitcloud

    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"
    }
    

    Using getCdnDistribution

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCdnDistribution(args: GetCdnDistributionArgs, opts?: InvokeOptions): Promise<GetCdnDistributionResult>
    function getCdnDistributionOutput(args: GetCdnDistributionOutputArgs, opts?: InvokeOptions): Output<GetCdnDistributionResult>
    def get_cdn_distribution(distribution_id: Optional[str] = None,
                             project_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCdnDistributionResult
    def get_cdn_distribution_output(distribution_id: pulumi.Input[Optional[str]] = None,
                             project_id: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCdnDistributionResult]
    func LookupCdnDistribution(ctx *Context, args *LookupCdnDistributionArgs, opts ...InvokeOption) (*LookupCdnDistributionResult, error)
    func LookupCdnDistributionOutput(ctx *Context, args *LookupCdnDistributionOutputArgs, opts ...InvokeOption) LookupCdnDistributionResultOutput

    > Note: This function is named LookupCdnDistribution in the Go SDK.

    public static class GetCdnDistribution 
    {
        public static Task<GetCdnDistributionResult> InvokeAsync(GetCdnDistributionArgs args, InvokeOptions? opts = null)
        public static Output<GetCdnDistributionResult> Invoke(GetCdnDistributionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCdnDistributionResult> getCdnDistribution(GetCdnDistributionArgs args, InvokeOptions options)
    public static Output<GetCdnDistributionResult> getCdnDistribution(GetCdnDistributionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: stackit:index/getCdnDistribution:getCdnDistribution
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DistributionId string
    STACKIT project ID associated with the distribution
    ProjectId string
    STACKIT project ID associated with the distribution
    DistributionId string
    STACKIT project ID associated with the distribution
    ProjectId string
    STACKIT project ID associated with the distribution
    distributionId String
    STACKIT project ID associated with the distribution
    projectId String
    STACKIT project ID associated with the distribution
    distributionId string
    STACKIT project ID associated with the distribution
    projectId string
    STACKIT project ID associated with the distribution
    distribution_id str
    STACKIT project ID associated with the distribution
    project_id str
    STACKIT project ID associated with the distribution
    distributionId String
    STACKIT project ID associated with the distribution
    projectId String
    STACKIT project ID associated with the distribution

    getCdnDistribution Result

    The following output properties are available:

    Config GetCdnDistributionConfig
    The distribution configuration
    CreatedAt string
    Time when the distribution was created
    DistributionId string
    STACKIT project ID associated with the distribution
    Domains List<GetCdnDistributionDomain>
    List of configured domains for the distribution
    Errors List<string>
    List of distribution errors
    Id string
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    ProjectId string
    STACKIT project ID associated with the distribution
    Status string
    Status of the distribution
    UpdatedAt string
    Time when the distribution was last updated
    Config GetCdnDistributionConfig
    The distribution configuration
    CreatedAt string
    Time when the distribution was created
    DistributionId string
    STACKIT project ID associated with the distribution
    Domains []GetCdnDistributionDomain
    List of configured domains for the distribution
    Errors []string
    List of distribution errors
    Id string
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    ProjectId string
    STACKIT project ID associated with the distribution
    Status string
    Status of the distribution
    UpdatedAt string
    Time when the distribution was last updated
    config GetCdnDistributionConfig
    The distribution configuration
    createdAt String
    Time when the distribution was created
    distributionId String
    STACKIT project ID associated with the distribution
    domains List<GetCdnDistributionDomain>
    List of configured domains for the distribution
    errors List<String>
    List of distribution errors
    id String
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    projectId String
    STACKIT project ID associated with the distribution
    status String
    Status of the distribution
    updatedAt String
    Time when the distribution was last updated
    config GetCdnDistributionConfig
    The distribution configuration
    createdAt string
    Time when the distribution was created
    distributionId string
    STACKIT project ID associated with the distribution
    domains GetCdnDistributionDomain[]
    List of configured domains for the distribution
    errors string[]
    List of distribution errors
    id string
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    projectId string
    STACKIT project ID associated with the distribution
    status string
    Status of the distribution
    updatedAt string
    Time when the distribution was last updated
    config GetCdnDistributionConfig
    The distribution configuration
    created_at str
    Time when the distribution was created
    distribution_id str
    STACKIT project ID associated with the distribution
    domains Sequence[GetCdnDistributionDomain]
    List of configured domains for the distribution
    errors Sequence[str]
    List of distribution errors
    id str
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    project_id str
    STACKIT project ID associated with the distribution
    status str
    Status of the distribution
    updated_at str
    Time when the distribution was last updated
    config Property Map
    The distribution configuration
    createdAt String
    Time when the distribution was created
    distributionId String
    STACKIT project ID associated with the distribution
    domains List<Property Map>
    List of configured domains for the distribution
    errors List<String>
    List of distribution errors
    id String
    Terraform's internal resource identifier. It is structured as "projectId,distributionId".
    projectId String
    STACKIT project ID associated with the distribution
    status String
    Status of the distribution
    updatedAt String
    Time when the distribution was last updated

    Supporting Types

    GetCdnDistributionConfig

    Backend GetCdnDistributionConfigBackend
    The configured backend for the distribution
    Optimizer GetCdnDistributionConfigOptimizer
    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.
    Redirects GetCdnDistributionConfigRedirects
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    Regions List<string>
    The configured regions where content will be hosted
    BlockedCountries List<string>
    The configured countries where distribution of content is blocked
    Backend GetCdnDistributionConfigBackend
    The configured backend for the distribution
    Optimizer GetCdnDistributionConfigOptimizer
    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.
    Redirects GetCdnDistributionConfigRedirects
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    Regions []string
    The configured regions where content will be hosted
    BlockedCountries []string
    The configured countries where distribution of content is blocked
    backend GetCdnDistributionConfigBackend
    The configured backend for the distribution
    optimizer GetCdnDistributionConfigOptimizer
    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.
    redirects GetCdnDistributionConfigRedirects
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    regions List<String>
    The configured regions where content will be hosted
    blockedCountries List<String>
    The configured countries where distribution of content is blocked
    backend GetCdnDistributionConfigBackend
    The configured backend for the distribution
    optimizer GetCdnDistributionConfigOptimizer
    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.
    redirects GetCdnDistributionConfigRedirects
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    regions string[]
    The configured regions where content will be hosted
    blockedCountries string[]
    The configured countries where distribution of content is blocked
    backend GetCdnDistributionConfigBackend
    The configured backend for the distribution
    optimizer GetCdnDistributionConfigOptimizer
    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.
    redirects GetCdnDistributionConfigRedirects
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    regions Sequence[str]
    The configured regions where content will be hosted
    blocked_countries Sequence[str]
    The configured countries where distribution of content is blocked
    backend Property Map
    The configured backend for the distribution
    optimizer Property Map
    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.
    redirects Property Map
    A wrapper for a list of redirect rules that allows for redirect settings on a distribution
    regions List<String>
    The configured regions where content will be hosted
    blockedCountries List<String>
    The configured countries where distribution of content is blocked

    GetCdnDistributionConfigBackend

    BucketUrl string
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    Geofencing Dictionary<string, ImmutableArray<string>>
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    OriginRequestHeaders Dictionary<string, string>
    The configured type http origin request headers for the backend
    OriginUrl 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.
    BucketUrl string
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    Geofencing map[string][]string
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    OriginRequestHeaders map[string]string
    The configured type http origin request headers for the backend
    OriginUrl 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.
    bucketUrl String
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    geofencing Map<String,List<String>>
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    originRequestHeaders Map<String,String>
    The configured type http origin request headers for the backend
    originUrl 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.
    bucketUrl string
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    geofencing {[key: string]: string[]}
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    originRequestHeaders {[key: string]: string}
    The configured type http origin request headers for the backend
    originUrl 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.
    bucket_url str
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    geofencing Mapping[str, Sequence[str]]
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    origin_request_headers Mapping[str, str]
    The configured type http origin request headers for the backend
    origin_url str
    The configured backend type http for the distribution
    region str
    The region where the bucket is hosted. Required if type is 'bucket'.
    type str
    The configured backend type. Possible values are: http, bucket.
    bucketUrl String
    The URL of the bucket (e.g. https://s3.example.com). Required if type is 'bucket'.
    geofencing Map<List<String>>
    The configured type http to configure countries where content is allowed. A map of URLs to a list of countries
    originRequestHeaders Map<String>
    The configured type http origin request headers for the backend
    originUrl 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.

    GetCdnDistributionConfigOptimizer

    Enabled bool
    Enabled bool
    enabled Boolean
    enabled boolean
    enabled bool
    enabled Boolean

    GetCdnDistributionConfigRedirects

    Rules List<GetCdnDistributionConfigRedirectsRule>
    A list of redirect rules. The order of rules matters for evaluation
    Rules []GetCdnDistributionConfigRedirectsRule
    A list of redirect rules. The order of rules matters for evaluation
    rules List<GetCdnDistributionConfigRedirectsRule>
    A list of redirect rules. The order of rules matters for evaluation
    rules GetCdnDistributionConfigRedirectsRule[]
    A list of redirect rules. The order of rules matters for evaluation
    rules Sequence[GetCdnDistributionConfigRedirectsRule]
    A list of redirect rules. The order of rules matters for evaluation
    rules List<Property Map>
    A list of redirect rules. The order of rules matters for evaluation

    GetCdnDistributionConfigRedirectsRule

    Description string
    An optional description for the redirect rule
    Enabled bool
    A toggle to enable or disable the redirect rule. Default to true
    Matchers List<GetCdnDistributionConfigRedirectsRuleMatcher>
    A list of matchers that define when this rule should apply. At least one matcher is required
    RuleMatchCondition string
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    StatusCode int
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    TargetUrl string
    The target URL to redirect to. Must be a valid URI
    Description string
    An optional description for the redirect rule
    Enabled bool
    A toggle to enable or disable the redirect rule. Default to true
    Matchers []GetCdnDistributionConfigRedirectsRuleMatcher
    A list of matchers that define when this rule should apply. At least one matcher is required
    RuleMatchCondition string
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    StatusCode int
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    TargetUrl string
    The target URL to redirect to. Must be a valid URI
    description String
    An optional description for the redirect rule
    enabled Boolean
    A toggle to enable or disable the redirect rule. Default to true
    matchers List<GetCdnDistributionConfigRedirectsRuleMatcher>
    A list of matchers that define when this rule should apply. At least one matcher is required
    ruleMatchCondition String
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    statusCode Integer
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    targetUrl String
    The target URL to redirect to. Must be a valid URI
    description string
    An optional description for the redirect rule
    enabled boolean
    A toggle to enable or disable the redirect rule. Default to true
    matchers GetCdnDistributionConfigRedirectsRuleMatcher[]
    A list of matchers that define when this rule should apply. At least one matcher is required
    ruleMatchCondition string
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    statusCode number
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    targetUrl string
    The target URL to redirect to. Must be a valid URI
    description str
    An optional description for the redirect rule
    enabled bool
    A toggle to enable or disable the redirect rule. Default to true
    matchers Sequence[GetCdnDistributionConfigRedirectsRuleMatcher]
    A list of matchers that define when this rule should apply. At least one matcher is required
    rule_match_condition str
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    status_code int
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    target_url str
    The target URL to redirect to. Must be a valid URI
    description String
    An optional description for the redirect rule
    enabled Boolean
    A toggle to enable or disable the redirect rule. Default to true
    matchers List<Property Map>
    A list of matchers that define when this rule should apply. At least one matcher is required
    ruleMatchCondition String
    Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
    statusCode Number
    The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
    targetUrl String
    The target URL to redirect to. Must be a valid URI

    GetCdnDistributionConfigRedirectsRuleMatcher

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

    GetCdnDistributionDomain

    Errors List<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
    Errors []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
    errors List<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
    errors 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
    errors Sequence[str]
    List of domain errors
    name str
    The name of the domain
    status str
    The status of the domain
    type str
    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
    errors List<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

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.6
    published on Wednesday, May 6, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.