### Import CDN Resource Example Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/cdn.md Use the `terraform import` command to import an existing CDN resource. The ID must be the unsigned integer ID of the CDN. ```shell $ terraform import cdn77_cdn.example # must be the ID (unsigned integer) of the CDN # Example: $ terraform import cdn77_cdn.example 1837865409 ``` -------------------------------- ### GET /cdn77_object_storages Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/object_storages.md Retrieves a list of all available Object Storage clusters. ```APIDOC ## GET /cdn77_object_storages ### Description Retrieves a list of all available Object Storage clusters. ### Method GET ### Endpoint cdn77_object_storages ### Response #### Success Response (200) - **clusters** (Attributes List) - List of all Object Storage clusters #### Nested Schema for clusters - **id** (String) - ID (UUID) of the Object Storage cluster - **label** (String) - Label of the Object Storage cluster - **url** (String) - Absolute URL of this resource - **url_parts** (Attributes) - Set of attributes describing the resource URL #### Nested Schema for clusters.url_parts - **base_path** (String) - Path to the directory where the content is stored - **host** (String) - Network host - **port** (Number) - Port number - **scheme** (String) - URL scheme (http or https) ``` -------------------------------- ### GET cdn77_cdns Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Retrieves a list of all CDNs available in the account. ```APIDOC ## GET cdn77_cdns ### Description Retrieves a list of all CDNs associated with the account. ### Method GET ### Endpoint data "cdn77_cdns" "all" ### Response #### Success Response (200) - **cdns** (Attributes List) - List of all CDNs, including properties such as id, label, url, cache settings, and security configurations. ``` -------------------------------- ### GET cdn77_origins Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origins.md Retrieves a list of all origins including AWS, Object Storage, and URL types. ```APIDOC ## GET cdn77_origins ### Description Retrieves a list of all origins configured in the CDN77 account, categorized by type (AWS, Object Storage, and URL). ### Response #### Success Response (200) - **aws** (List) List of all AWS Origins - **object_storage** (List) List of all Object Storage Origins - **url** (List) List of all URL Origins #### Response Example { "aws": [], "object_storage": [], "url": [] } ``` -------------------------------- ### Get AWS Origin by ID Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_aws.md Use this data source to retrieve an existing AWS Origin by its ID. Ensure the ID is a valid UUID. ```terraform data "cdn77_origin_aws" "example" { id = "4cd2378b-dec8-49e2-aa17-bf7561452998" } ``` -------------------------------- ### Create a CDN77 SSL Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/ssl.md Use this resource to manage your SSL certificates and keys. Ensure the certificate and private key files are correctly referenced. If loading from a file, use trimspace(file(...)) or chomp(file(...)) to remove extra newlines from the certificate and private key content. ```terraform resource "cdn77_ssl" "example" { certificate = file("${path.module}/my-cert.pem") private_key = file("${path.module}/my-key.pem") } ``` -------------------------------- ### SSL Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure SSL settings for your CDN. ```APIDOC ## SSL Configuration ### Description Configure SSL settings for your CDN, including the SSL certificate ID and type. ### Parameters #### Nested Schema for `cdns.ssl` - `ssl_id` (String) - Optional - ID (UUID) of the SSL certificate. - `type` (String) - Optional - Possible values: instantSsl, none, SNI. ``` -------------------------------- ### Query String Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure query string handling for your CDN. ```APIDOC ## Query String Configuration ### Description Configure query string handling for your CDN. This includes ignoring specific parameters or using a list of parameters. ### Parameters #### Nested Schema for `cdns.query_string` - `ignore_type` (String) - Optional - Specifies how query string parameters are handled (e.g., "list"). - `parameters` (Set of String) - Optional - List of parameters used when "ignore_type" is set to "list". ``` -------------------------------- ### Create a CDN Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/cdn.md Use this resource to create a new CDN. Ensure you have a corresponding origin defined. CNAMEs should be mapped via DNS to the CDN URL for SSL certificate generation. ```terraform resource "cdn77_cdn" "example" { label = "Static content for example.com" origin_id = cdn77_origin_url.example.id cnames = ["cdn.example.com"] } ``` -------------------------------- ### Configure CDN77 Provider Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/index.md Initializes the provider with authentication credentials and optional API settings. ```terraform provider "cdn77" { # Required only if the CDN77_TOKEN env variable isn't set token = "--- your secret token here ---" # Optional fields with their default values endpoint = "https://api.cdn77.com" timeout = 10 # in seconds } ``` -------------------------------- ### Import CDN77 Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/cdn.md Instructions for importing existing CDN77 resources into Terraform state. ```APIDOC ## Import ### Description Use the terraform import command to bring existing CDN77 resources into your state file. ### Command `terraform import cdn77_cdn. ` ### Example `terraform import cdn77_cdn.example 1837865409` ``` -------------------------------- ### Secure Token Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure secure token settings to protect your content from unauthorized access. ```APIDOC ## Secure Token Configuration ### Description Configure secure token settings to protect your content from unauthorized access. Tokens can be placed in the query string or path, or disabled entirely. ### Parameters #### Nested Schema for `cdns.secure_token` - `token` (String, Sensitive) - Required - The secure token. Token length is between 8 and 64 characters. - `type` (String) - Required - Specifies the method for token authentication. Possible values: - parameter - Token will be in the query string - e.g.: /video.mp4?secure=MY_SECURE_TOKEN. - path - Token will be in the path - e.g.: /MY_SECURE_TOKEN/video.mp4. - none - Use to disable secure token. - highwinds ``` -------------------------------- ### Stream Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure stream settings for your CDN. ```APIDOC ## Stream Configuration ### Description Configure stream settings for your CDN, including origin URL, port, protocol, and authentication details. ### Parameters #### Nested Schema for `cdns.stream` - `origin_url` (String) - Required - The origin URL for the stream. - `password` (String, Sensitive) - Optional - Password for stream authentication. - `path` (String) - Optional - The path for the stream. - `port` (Number) - Optional - The port for the stream. - `protocol` (String) - Optional - The protocol for the stream (e.g., "http", "https"). - `query_key` (String) - Optional - The query key for the stream. ``` -------------------------------- ### Read all CDNs Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Use this data source to fetch a list of all your CDNs. No configuration is required. ```terraform data "cdn77_cdns" "all" { } ``` -------------------------------- ### Headers Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure various response headers for CDN content. ```APIDOC ## Headers Configuration ### Description Configure various response headers for CDN content, including Content-Disposition, CORS settings, and Host header forwarding. ### Parameters #### Nested Schema for `cdns.headers` - `content_disposition_type` (String) - Optional - When the "type" is set to "parameter" the Content-Disposition is defined by the "cd" parameter in the URL, often set to "attachment". The filename is specified using the "fn" parameter in the URL. - `cors_enabled` (Boolean) - Optional - The "Access-Control-Allow-Origin:" response header will always act in accordance with the "Origin:" request header sent by the client. For example, a request including the HTTP header "Origin: https://www.cdn77.com" will translate to the response header "Access-Control-Allow-Origin: https://www.cdn77.com". Files remain cached while the request/response header changes. - `cors_timing_enabled` (Boolean) - Optional - When enabled "Timing-Allow-Origin" CORS header is set. - `cors_wildcard_enabled` (Boolean) - Optional - When enabled the wildcard value (*) is set in CORS headers. - `host_header_forwarding_enabled` (Boolean) - Optional - When fetching the content from the origin server, our edge servers will pass the host header that was included in the request between the user and our edge server. ``` -------------------------------- ### Import an Existing CDN77 SSL Certificate Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/ssl.md Import an existing SSL certificate using its ID and private key. The private key must be base64 encoded. The ID is a UUID, and the private key should include PEM headers. ```shell $ terraform import cdn77_ssl.example , ``` ```shell # must be the ID (UUID) of the SSL certificate # must be an entire private key (including PEM headers) encoded via base64. # Example: $ key=$(base64 --wrap=0 <,, # must be the ID (UUID) of the Object Storage Origin # must be ACL type (one of: "authenticated-read", "private", "public-read", "public-read-write") # must be an ID (UUID) of the Object Storage cluster # Example: $ terraform import cdn77_origin_object_storage.example b2d6a7df-18df-4931-8c78-3842bc6e12f0,private,\ 842b5641-b641-4723-ac81-f8cc286e288f ``` -------------------------------- ### HTTPS Redirect Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure HTTPS redirect settings for your CDN. ```APIDOC ## HTTPS Redirect Configuration ### Description Configure HTTPS redirect settings for your CDN. You can enable HTTPS redirects and specify the redirect code (301 or 302). ### Parameters #### Nested Schema for `cdns.https_redirect` - `code` (Number) - Optional - 301 for permanent redirect and 302 for temporary redirect. If you are not sure, select the default 301 code. - `enabled` (Boolean) - Optional - Enable or disable HTTPS redirect. ``` -------------------------------- ### Create an AWS Origin Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_aws.md Use this resource to configure an AWS S3 bucket as an origin for your CDN77 service. Ensure you provide valid AWS credentials and the correct S3 bucket URL. ```terraform resource "cdn77_origin_aws" "example" { label = "Assets AWS bucket for example.com" url = "https://examplecom-static-assets.s3.eu-central-1.amazonaws.com" region = "eu-central-1" access_key_id = "23478207027842073230762374023" access_key_secret = "VWK92izmd7zpY8Khs/Dllv4yLYc4sFWNyg2XtuNF" } ``` -------------------------------- ### CDN77 Resource Nested Schemas Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/cdn.md Configuration schemas for various CDN77 resource settings. ```APIDOC ## Nested Schemas ### headers - **content_disposition_type** (String) - Optional - Content-Disposition type. - **cors_enabled** (Boolean) - Optional - Enables Access-Control-Allow-Origin headers. - **cors_timing_enabled** (Boolean) - Optional - Enables Timing-Allow-Origin header. - **cors_wildcard_enabled** (Boolean) - Optional - Enables wildcard in CORS headers. - **host_header_forwarding_enabled** (Boolean) - Optional - Enables host header forwarding. ### hotlink_protection - **domains** (Set of String) - Optional - List of domains. - **empty_referer_denied** (Boolean) - Optional - Deny empty referrers. - **type** (String) - Optional - blocklist or passlist. ### https_redirect - **code** (Number) - Optional - 301 or 302. - **enabled** (Boolean) - Optional - Enable redirect. ### ip_protection - **ips** (Set of String) - Optional - List of IP addresses. - **type** (String) - Optional - blocklist or passlist. ### query_string - **ignore_type** (String) - Optional - Ignore type. - **parameters** (Set of String) - Optional - List of parameters. ### secure_token - **token** (String) - Optional - Sensitive token (8-64 chars). - **type** (String) - Optional - parameter, path, none, or highwinds. ### ssl - **ssl_id** (String) - Optional - UUID of SSL certificate. - **type** (String) - Optional - instantSsl, none, or SNI. ### stream - **origin_url** (String) - Optional - Origin URL. - **password** (String) - Optional - Sensitive password. - **path** (String) - Optional - Path. - **port** (Number) - Optional - Port. - **protocol** (String) - Optional - Protocol. - **query_key** (String) - Optional - Query key. ``` -------------------------------- ### Retrieve SSL certificate details Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/ssl.md Use this data source to fetch information about an existing SSL certificate by providing its unique identifier. ```terraform data "cdn77_ssl" "example" { id = "9b39930c-6324-4e1d-91b9-4d056a638ea7" } ``` -------------------------------- ### Hotlink Protection Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure hotlink protection to prevent unauthorized linking to your content. ```APIDOC ## Hotlink Protection Configuration ### Description Configure hotlink protection to prevent unauthorized linking to your content. You can specify allowed domains or block specific domains, and control behavior for empty referrers. ### Parameters #### Nested Schema for `cdns.hotlink_protection` - `domains` (Set of String) - Required - List of domains for hotlink protection. - `empty_referer_denied` (Boolean) - Optional - Enabling this parameter prevents your content from being directly accessed by sources that send empty referers. - `type` (String) - Required - With "type": "blocklist" all domains set in the "domains" parameter are not allowed. With "type": "passlist" only domains in "domains" parameter are allowed. ``` -------------------------------- ### CDN77 Provider Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/index.md Configuration block for the CDN77 provider. The token is required unless the CDN77_TOKEN environment variable is set. Endpoint and timeout are optional. ```APIDOC ## CDN77 Provider Configuration ### Description Configure the CDN77 provider with your API token, desired API endpoint, and request timeout. ### Method Provider Configuration ### Endpoint N/A ### Parameters #### Optional - **token** (String, Sensitive) - Required if CDN77_TOKEN environment variable is not set - Authentication token from https://client.cdn77.com/account/api - **endpoint** (String) - Optional - API endpoint; defaults to https://api.cdn77.com - **timeout** (Number) - Optional - Timeout for all API calls (in seconds). Negative values disable the timeout. Default is 30 seconds. ### Request Example ```terraform provider "cdn77" { token = "--- your secret token here ---" endpoint = "https://api.cdn77.com" timeout = 10 } ``` ### Response N/A (This is a configuration block, not an API endpoint response) ``` -------------------------------- ### Read all Origins Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origins.md Use this data source to fetch all available origins in your CDN77 account. ```terraform data "cdn77_origins" "all" { } ``` -------------------------------- ### IP Protection Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure IP protection settings to control access based on IP addresses. ```APIDOC ## IP Protection Configuration ### Description Configure IP protection settings to control access based on IP addresses. You can either block specific IP addresses or allow only specific IP addresses. ### Parameters #### Nested Schema for `cdns.ip_protection` - `ips` (Set of String) - Required - List of IP addresses for IP protection. - `type` (String) - Required - With "type": "blocklist" all IP addresses set in the "ips" parameter are not allowed. With "type": "passlist" only IP addresses in "ips" parameter are allowed. ``` -------------------------------- ### cdn77_origin_object_storage Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_object_storage.md Manages an Object Storage Origin. This resource allows for the creation, configuration, and management of origins that use Object Storage services. ```APIDOC ## cdn77_origin_object_storage Resource ### Description Manages an Object Storage Origin. This resource allows for the creation, configuration, and management of origins that use Object Storage services. ### Method Not applicable (Terraform resource management) ### Endpoint Not applicable (Terraform resource management) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (Managed via Terraform configuration) ### Request Example ```terraform resource "cdn77_origin_object_storage" "example" { label = "Assets bucket for example.com" bucket_name = "examplecom-static-assets" acl = "private" cluster_id = local.eu_cluster_id note = "Optional note for the Origin" } ``` ### Response #### Success Response (200) None (Managed via Terraform state) #### Response Example None (Managed via Terraform state) ### Schema #### Required - **acl** (String) Object Storage access key ACL - **bucket_name** (String) Name of your Object Storage bucket - **cluster_id** (String) ID of the Object Storage storage cluster - **label** (String) The label helps you to identify your Origin #### Optional - **note** (String) Optional note for the Origin #### Read-Only - **id** (String) Origin ID (UUID) - **url** (String) Absolute URL of this resource. Alternative to the attribute "url_parts". - **url_parts** (Attributes) Set of attributes describing the resource URL. Alternative to the attribute "url". - **base_path** (String) Path to the directory where the content is stored - **port** (Number) Port number between 1 and 65535 (if not specified, default scheme port is used) - **host** (String) Network host; can be a domain name or an IP address - **scheme** (String) URL scheme; can be either "http" or "https" - **usage** (Attributes) Usage statistics of the Object Storage bucket - **files** (Number) Number of files stored on the Object Storage bucket - **size_bytes** (Number) Total size of the Object Storage bucket in bytes ### Import Import is supported using the following syntax: ```shell $ terraform import cdn77_origin_object_storage.example ,, ``` **Example:** ```shell $ terraform import cdn77_origin_object_storage.example b2d6a7df-18df-4931-8c78-3842bc6e12f0,private,842b5641-b641-4723-ac81-f8cc286e288f ``` ``` -------------------------------- ### Retrieve CDN information with Terraform Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdn.md Use this data source to fetch details of a CDN by providing its unique ID. ```terraform data "cdn77_cdn" "example" { id = 1837865409 } ``` -------------------------------- ### Retrieve URL Origin details with Terraform Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_url.md Use this data source to fetch information about an existing URL Origin by providing its unique ID. ```terraform data "cdn77_origin_url" "example" { id = "8f2718e2-cf17-4552-816a-cbf2308e792b" } ``` -------------------------------- ### cdn77_ssl Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/ssl.md Resource definition for managing SSL certificates and keys. ```APIDOC ## cdn77_ssl (Resource) ### Description SSL resource allows you to manage your SSL certificates and keys. ### Parameters #### Required - **certificate** (String) - Required - SNI certificate. Must not contain leading or trailing whitespace. - **private_key** (String, Sensitive) - Required - Private key associated with the certificate. Must not contain leading or trailing whitespace. ### Read-Only - **expires_at** (String) - Date and time of the SNI certificate expiration - **id** (String) - ID (UUID) of the SSL certificate - **subjects** (Set of String) - Subjects (domain names) of the certificate ### Import Import is supported using the `terraform import` command: `terraform import cdn77_ssl.example ,` Note: must be an entire private key (including PEM headers) encoded via base64. ``` -------------------------------- ### Create a CDN77 URL Origin Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_url.md Use this resource to define a custom URL origin for your CDN77 service. It requires a label for identification and the origin URL. ```terraform resource "cdn77_origin_url" "example" { label = "Static content for example.com" url = "http://static.example.com" } ``` -------------------------------- ### cdn77_ssls Data Source Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/ssls.md The `cdn77_ssls` data source allows you to fetch a list of all SSL certificates configured for your CDN77 account. This is useful for auditing or managing certificate expirations. ```APIDOC ## cdn77_ssls (Data Source) ### Description SSLs data source allows you to read all your SSL certificates and keys. ### Method GET ### Endpoint /v1/ssl ### Parameters #### Query Parameters - None #### Request Body - None ### Request Example ```terraform data "cdn77_ssls" "all" { } ``` ### Response #### Success Response (200) - **ssls** (list of objects) - List of all SSLs. Each object contains: - **certificate** (string) - SNI certificate. Must not contain leading or trailing whitespace. If loading from a file, use trimspace(file(...)) or chomp(file(...)) to remove extra newlines. - **expires_at** (string) - Date and time of the SNI certificate expiration. - **id** (string) - ID (UUID) of the SSL certificate. - **subjects** (set of strings) - Subjects (domain names) of the certificate. #### Response Example ```json { "ssls": [ { "certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "expires_at": "2024-12-31T23:59:59Z", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "subjects": ["example.com", "www.example.com"] } ] } ``` ``` -------------------------------- ### cdn77_origin_object_storage Data Source Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_object_storage.md This data source retrieves information about an existing Object Storage Origin. It requires the Origin ID to fetch the details. ```APIDOC ## cdn77_origin_object_storage (Data Source) ### Description Object Storage Origin resource allows you to manage your Object Storage Origins. ### Method GET (Implicitly through Terraform data source) ### Endpoint Not directly applicable as this is a Terraform data source. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```terraform data "cdn77_origin_object_storage" "example" { id = "b2d6a7df-18df-4931-8c78-3842bc6e12f0" } ``` ### Response #### Success Response (200) - **id** (String) - Origin ID (UUID) - **label** (String) - The label helps you to identify your Origin - **acl** (String) - Object Storage access key ACL - **bucket_name** (String) - Name of your Object Storage bucket - **cluster_id** (String) - ID of the Object Storage storage cluster - **note** (String) - Optional note for the Origin - **url** (String) - Absolute URL of this resource. Alternative to the attribute "url_parts". - **url_parts** (Attributes) - Set of attributes describing the resource URL. Alternative to the attribute "url". - **base_path** (String) - Path to the directory where the content is stored - **host** (String) - Network host; can be a domain name or an IP address - **port** (Number) - Port number between 1 and 65535 (if not specified, default scheme port is used) - **scheme** (String) - URL scheme; can be either "http" or "https" - **usage** (Attributes) - Usage statistics of the Object Storage bucket - **files** (Number) - Number of files stored on the Object Storage bucket - **size_bytes** (Number) - Total size of the Object Storage bucket in bytes #### Response Example ```json { "id": "b2d6a7df-18df-4931-8c78-3842bc6e12f0", "label": "MyObjectStorageOrigin", "acl": "private", "bucket_name": "my-cdn77-bucket", "cluster_id": "cluster-123", "note": "This is a test origin", "url": "http://my-cdn77-bucket.s3.example.com/path", "url_parts": { "base_path": "/path", "host": "my-cdn77-bucket.s3.example.com", "port": 80, "scheme": "http" }, "usage": { "files": 1000, "size_bytes": 1073741824 } } ``` ``` -------------------------------- ### Import an existing CDN77 URL Origin Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_url.md Import an existing URL Origin into your Terraform state using its UUID. This command associates the specified Origin ID with the Terraform resource. ```shell $ terraform import cdn77_origin_url.example # must be the ID (UUID) of the URL Origin # Example: $ terraform import cdn77_origin_url.example 8f2718e2-cf17-4552-816a-cbf2308e792b ``` -------------------------------- ### cdn77_cdn Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/cdn.md The cdn77_cdn resource allows you to manage your CDN configurations, including origin settings, caching policies, and security features. ```APIDOC ## cdn77_cdn (Resource) ### Description Manages a CDN resource within the CDN77 platform. ### Parameters #### Required - **label** (String) - Required - The label helps you to identify your CDN - **origin_id** (String) - Required - ID (UUID) of attached Origin (content source for CDN) #### Optional - **cache** (Attributes) - Optional - Cache duration settings - **cnames** (Set of String) - Optional - CNAME assigned to CDN - **conditional_features** (Attributes) - Optional - Conditional features configuration and secrets - **geo_protection** (Attributes) - Optional - Geo protection settings - **headers** (Attributes) - Optional - Custom headers configuration - **hotlink_protection** (Attributes) - Optional - Hotlink protection settings - **https_redirect** (Attributes) - Optional - HTTPS redirect settings - **ip_protection** (Attributes) - Optional - IP protection settings - **mp4_pseudo_streaming_enabled** (Boolean) - Optional - Enable flash-based video player support - **note** (String) - Optional - Optional note - **origin_headers** (Map of String) - Optional - Custom HTTP headers for origin server - **query_string** (Attributes) - Optional - Query string handling settings - **rate_limit_enabled** (Boolean) - Optional - Enable data transfer rate limiting - **secure_token** (Attributes) - Optional - Signed URL security settings - **ssl** (Attributes) - Optional - SSL configuration - **stream** (Attributes) - Optional - Stream CDN parameters ### Read-Only - **creation_time** (String) - Timestamp when CDN was created - **id** (Number) - ID of the CDN - **url** (String) - URL of the CDN ``` -------------------------------- ### Manage Object Storage Origin Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_object_storage.md Defines an Object Storage Origin resource using a data source to retrieve the cluster ID. ```terraform data "cdn77_object_storages" "all" { } locals { eu_cluster_id = one([for os in data.cdn77_object_storages.all.clusters : os.id if os.label == "EU"]) } resource "cdn77_origin_object_storage" "example" { label = "Assets bucket for example.com" bucket_name = "examplecom-static-assets" acl = "private" cluster_id = local.eu_cluster_id } ``` -------------------------------- ### cdn77_origin_aws Data Source Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_aws.md Use the cdn77_origin_aws data source to retrieve information about an existing AWS Origin. ```APIDOC ## cdn77_origin_aws Data Source ### Description AWS Origin resource allows you to manage your AWS Origins ### Method GET ### Endpoint /origins/aws/{id} ### Parameters #### Path Parameters - **id** (String) - Required - Origin ID (UUID) ### Response #### Success Response (200) - **access_key_id** (String) - AWS access key ID - **access_key_secret** (String, Sensitive) - AWS access key secret - **label** (String) - The label helps you to identify your Origin - **note** (String) - Optional note for the Origin - **region** (String) - AWS region - **url** (String) - Absolute URL of this resource. Alternative to the attribute "url_parts". - **url_parts** (Attributes) - Set of attributes describing the resource URL. Alternative to the attribute "url". - **base_path** (String) - Path to the directory where the content is stored - **host** (String) - Network host; can be a domain name or an IP address - **port** (Number) - Port number between 1 and 65535 (if not specified, default scheme port is used) - **scheme** (String) - URL scheme; can be either "http" or "https" ### Request Example ```terraform data "cdn77_origin_aws" "example" { id = "4cd2378b-dec8-49e2-aa17-bf7561452998" } ``` ### Response Example ```json { "id": "4cd2378b-dec8-49e2-aa17-bf7561452998", "access_key_id": "AKIAIOSFODNN7EXAMPLE", "access_key_secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", "label": "My AWS Origin", "note": "This is a test origin.", "region": "us-east-1", "url": "https://my-bucket.s3.amazonaws.com/path", "url_parts": { "base_path": "path", "host": "my-bucket.s3.amazonaws.com", "port": 443, "scheme": "https" } } ``` ``` -------------------------------- ### Retrieve Object Storage Origin Data Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_object_storage.md Use this data source to fetch details about an existing Object Storage Origin by its unique ID. ```terraform data "cdn77_origin_object_storage" "example" { id = "b2d6a7df-18df-4931-8c78-3842bc6e12f0" } ``` -------------------------------- ### Geo Protection Configuration Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/cdns.md Configure geo-protection settings to control access based on country codes. ```APIDOC ## Geo Protection Configuration ### Description Configure geo-protection settings to control access based on country codes. You can either block specific countries or allow only specific countries. ### Parameters #### Nested Schema for `cdns.geo_protection` - `countries` (Set of String) - Required - We are using ISO 3166-1 alpha-2 code. - `type` (String) - Required - With "type": "blocklist" all countries set in the "countries" parameter are not allowed. With "type": "passlist" only countries set in the "countries" parameter are allowed. ``` -------------------------------- ### Data Source: cdn77_origin_url Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/origin_url.md Retrieves details for a specific URL Origin resource using its unique identifier. ```APIDOC ## Data Source: cdn77_origin_url ### Description Retrieves information about a custom URL Origin resource managed within CDN77. ### Parameters #### Required - **id** (String) - Required - The unique Origin ID (UUID). ### Response - **label** (String) - The label used to identify the Origin. - **note** (String) - Optional note for the Origin. - **url** (String) - Absolute URL of this resource. - **url_parts** (Attributes) - Set of attributes describing the resource URL. ### Nested Schema for url_parts - **base_path** (String) - Path to the directory where the content is stored. - **host** (String) - Network host; can be a domain name or an IP address. - **port** (Number) - Port number between 1 and 65535. - **scheme** (String) - URL scheme; can be either "http" or "https". ### Request Example ```terraform data "cdn77_origin_url" "example" { id = "8f2718e2-cf17-4552-816a-cbf2308e792b" } ``` ``` -------------------------------- ### cdn77_ssl Data Source Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/data-sources/ssl.md This data source allows you to retrieve information about an SSL certificate using its ID. ```APIDOC ## cdn77_ssl (Data Source) ### Description SSL resource allows you to managed your SSL certificates and keys. ### Method GET (Implicitly through Terraform data source) ### Endpoint Not directly applicable as this is a Terraform data source, not a direct API endpoint. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```terraform data "cdn77_ssl" "example" { id = "9b39930c-6324-4e1d-91b9-4d056a638ea7" } ``` ### Response #### Success Response (200) - **certificate** (String) - SNI certificate. Must not contain leading or trailing whitespace. If loading from a file, use trimspace(file(...)) or chomp(file(...)) to remove extra newlines. - **expires_at** (String) - Date and time of the SNI certificate expiration - **private_key** (String, Sensitive) - Private key associated with the certificate. Must not contain leading or trailing whitespace. If loading from a file, use trimspace(file(...)) or chomp(file(...)) to remove extra newlines. - **subjects** (Set of String) - Subjects (domain names) of the certificate #### Response Example ```json { "certificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", "expires_at": "2024-12-31T23:59:59Z", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----", "subjects": ["example.com", "www.example.com"] } ``` ``` -------------------------------- ### Import an existing AWS Origin Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_aws.md Import an existing AWS Origin into Terraform management. You will need the Origin ID (UUID) and the AWS access key secret. ```shell $ terraform import cdn77_origin_aws.example , # must be the ID (UUID) of the AWS Origin # must be the secret of the AWS access key that you provided when creating the AWS Origin # Example: $ terraform import cdn77_origin_aws.example 4cd2378b-dec8-49e2-aa17-bf7561452998,VWK92izmd7zpY8Khs/Dllv4yLYc4sFWNyg2XtuNF ``` -------------------------------- ### cdn77_origin_url Resource Source: https://github.com/cdn77/terraform-provider-cdn77/blob/master/docs/resources/origin_url.md Resource definition for managing custom URL Origins in CDN77. ```APIDOC ## cdn77_origin_url (Resource) ### Description URL Origin resource allows you to manage your custom URL Origins. ### Parameters #### Required - **label** (String) - Required - The label helps you to identify your Origin #### Optional - **note** (String) - Optional - Optional note for the Origin - **url** (String) - Optional - Absolute URL of this resource. Alternative to the attribute "url_parts". - **url_parts** (Attributes) - Optional - Set of attributes describing the resource URL. #### Nested Schema for url_parts - **host** (String) - Required - Network host; can be a domain name or an IP address - **scheme** (String) - Required - URL scheme; can be either "http" or "https" - **base_path** (String) - Optional - Path to the directory where the content is stored - **port** (Number) - Optional - Port number between 1 and 65535 ### Read-Only - **id** (String) - Origin ID (UUID) ### Import Use the following command to import an existing origin: `terraform import cdn77_origin_url.example ` ```