Creates and manages IonosCloud CDN Distributions.
Manages a CDN Distribution on IonosCloud.
The following arguments are supported:
domain
- (Required)[string] The domain of the distribution.
certificate_id
- (Required)[string] The ID of the certificate to use for the distribution. You can create certificates with the certificate resource.
routing_rules
- (Required)[list] The routing rules for the distribution.
scheme
- (Required)[string] The scheme of the routing rule.
prefix
- (Required)[string] The prefix of the routing rule.
upstream
- (Required)[map] - A map of properties for the rule
host
- (Required)[string] The upstream host that handles the requests if not already cached. This host will be protected by the WAF if the option is enabled.
caching
- (Required)[bool] Enable or disable caching. If enabled, the CDN will cache the responses from the upstream host. Subsequent requests for the same resource will be served from the cache.
waf
- (Required)[bool] Enable or disable WAF to protect the upstream host.
sni_mode
- (Required)[string] The SNI (Server Name Indication) mode of the upstream. It supports two modes: 1) distribution
: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured domain of the CDN distribution; 2) origin
: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that matches the configured upstream/origin hostname.
rate_limit_class
- (Required)[string] Rate limit class that will be applied to limit the number of incoming requests per IP.
geo_restrictions
- (Optional)[map] - A map of geo_restrictions
allow_list
- (Optional)[string] List of allowed countries
block_list
- (Optional)[string] List of blocked countries
public_endpoint_v4
- IP of the distribution, it has to be included on the domain DNS Zone as A record.
public_endpoint_v6
- IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.
resource_urn
- Unique resource indentifier.
Resource Distribution can be imported using the resource id
, e.g.