streamtime_base_domain (Resource)

A base domain that Streamtime serves workloads under.

Example Usage

resource "streamtime_base_domain" "example" {
  domain                   = "example.com"
  auto_create_certificates = true

  dns_provider_config = {
    dns_provider = {
      provider_type = "cloudflare"
      zone_id       = var.cloudflare_zone_id
      api_token     = var.cloudflare_api_token
    }
  }
}

variable "cloudflare_zone_id" {
  type = string
}

variable "cloudflare_api_token" {
  type      = string
  sensitive = true
}

Schema

Required

  • dns_provider_config (Attributes, Sensitive) How Streamtime proves ownership of the domain. May hold credentials. (see below for nested schema)
  • domain (String) The domain name. Changing it creates a new base domain.

Optional

  • auto_create_certificates (Boolean) Let Streamtime create and renew the certificate for this domain.
  • tls_cert (String) PEM certificate to use instead of an automatic one.
  • tls_key (String, Sensitive) PEM private key for tls_cert.

Read-Only

  • certificate_expiry (String) When the current certificate expires.
  • id (String) Same as domain. Use the domain to import.

Nested Schema for dns_provider_config

Required:

  • dns_provider (Attributes) The DNS provider and its settings. Set only the fields that belong to the chosen provider_type. (see below for nested schema)

Nested Schema for dns_provider_config.dns_provider

Required:

  • provider_type (String) One of none, route53, stdns, cloudflare or godaddy. Use none when you supply tls_cert and tls_key yourself.

Optional:

  • api_key (String) godaddy: API key.
  • api_secret (String) godaddy: API secret.
  • api_token (String) cloudflare: API token with permission to edit DNS.
  • aws_access_key (String) route53: access key ID with permission to manage records in the zone.
  • aws_access_secret (String) route53: secret access key paired with aws_access_key.
  • aws_region (String) route53: AWS region.
  • cert_id (String) stdns: legacy certificate ID. Streamtime sets it when one exists.
  • hosted_zone_id (String) route53: ID of the hosted zone that holds the records.
  • subdomain (String) stdns: the subdomain registered with Streamtime DNS.
  • zone_apex (String) The verified registered domain of the zone. Streamtime sets it once zone access is verified.
  • zone_id (String) cloudflare: ID of the zone for the domain.
  • zone_record_id (String) stdns: ID of the zone record.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Import by domain name.
terraform import streamtime_base_domain.example example.com