Resource Definitions

Driver

Capability

Flavor

Resource Type

Wildcard Dns

This section contains example Resource Definitions using the Wildcard DNS Driver  returning an externally managed DNS record for routing and ingress inside the cluster.

The provision section is to co-provision  an ingress resource, see Routes  to learn how the networking Resource Types work together.

Resource Definitions


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-domain.com"
      template: '{{ index (splitList "." "${context.res.id}") 1 }}-${context.env.id}-${context.app.id}'
  provision:
    ingress:
      is_dependent: false
  criteria:
    - {}


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-domain.com"
      "template" = "{{ index (splitList \".\" \"$${context.res.id}\") 1 }}-$${context.env.id}-$${context.app.id}"
    })
  }

  provision = {
    "ingress" = {
      is_dependent = false
    }
  }
}

resource "humanitec_resource_definition_criteria" "dns-template_criteria_0" {
  resource_definition_id = resource.humanitec_resource_definition.dns-template.id

}

Top