Resource Definitions

Driver

Capability

Resource Type

Wildcard Dns

This section contains example Resource Definitions using the Wildcard DNS Driver for managing DNS records for routing and ingress inside the cluster.

  • dns-template.yaml: Shows how to use the Wildcard DNS Driver to return the name of an externally managed DNS record. This format is for use with the Humanitec CLI.


dns-template.yaml (view on GitHub) :

apiVersion: entity.humanitec.io/v1b1
kind: Definition
metadata:
  id: dns-template
entity:
  name: dns-template
  type: dns
  driver_type: humanitec/dns-wildcard
  driver_inputs:
    values:
      domain: "my-test-domain.com"
      template: "preview-${context.app.id}-${context.env.id}"


dns-template.tf (view on GitHub) :

resource "humanitec_resource_definition" "dns-template" {
  driver_type = "humanitec/dns-wildcard"
  id          = "dns-template"
  name        = "dns-template"
  type        = "dns"
  driver_inputs = {
    values_string = jsonencode({
      "domain"   = "my-test-domain.com"
      "template" = "preview-$${context.app.id}-$${context.env.id}"
    })
  }
}


Top