RunR v0.5.7

Documentation

runr_domain (Resource)

A custom domain of a project. Create the TXT record (verification_name / verification_value) and the record in dns_targets at your DNS provider; the domain serves once it is verified (verify = true waits for that, or run runr domains verify).

Example Usage#

resource "runr_domain" "api" {
  project_id = runr_project.api.id
  domain     = "api.example.com"
  tls_mode   = "cert-manager"
}

# Publish the records at your DNS provider, e.g. with the cloudflare provider:
#   TXT   runr_domain.api.verification_name  = runr_domain.api.verification_value
#   CNAME runr_domain.api.dns_targets[0].name = runr_domain.api.dns_targets[0].value
output "dns_records" {
  value = concat(
    [{ type = runr_domain.api.verification_type, name = runr_domain.api.verification_name, value = runr_domain.api.verification_value }],
    runr_domain.api.dns_targets,
  )
}

Schema#

Required#

  • domain (String) Host name, e.g. api.example.com.
  • project_id (String) Project id.

Optional#

  • certificate (String) PEM certificate chain (tls_mode = "custom").
  • private_key (String, Sensitive) PEM private key (tls_mode = "custom").
  • tls_mode (String) HTTPS certificate: none (the region's default), cert-manager or custom.
  • verify (Boolean) Wait at create until the DNS records are found and the domain is active.
  • verify_timeout (String) How long verify waits (Go duration).

Read-Only#

  • dns_targets (List of Object) Records that route the domain to the project (type, name, value). (see below for nested schema)
  • id (String) Domain id.
  • status (String) pending, verified, active or error.
  • url (String) URL of the domain.
  • verification_name (String) Ownership record name.
  • verification_type (String) Ownership record type (TXT).
  • verification_value (String) Ownership record value.

Nested Schema for dns_targets#

Read-Only:

  • name (String)
  • type (String)
  • value (String)

Import#

Import is supported using the following syntax:

The terraform import command can be used, for example:

# <project name or id>/<domain>
terraform import runr_domain.api orders-api/api.example.com

RunR v0.5.7 · MIT License