Skip to content

isabella232/terraform-dnsimple-cts

 
 

Repository files navigation

DNSimple Consul-Terraform-Sync NIA module

Requirements

Using the sync task

Define the task in your HCL config file like so:

# Task Block
task {
  name        = "dnsimple-task"
  description = "Create/delete/update DNS records"
  module      = "dnsimple/cts/dnsimple"

  condition "services" {
    names = ["web", "api"]
  }
  variable_files = ["/terraform.tfvars"]
}

For a complete example of what a HCL config file might look like refer to test/cts-config.hcl

Ensure the services that you have specified have the following parameters added in their meta section:

  • meta.zone_name:string - The zone (domain name) that is managed through DNSimple. e.g. vegan.pizza
  • meta.record_name:string - A valid label to create an A record in the specified zone. e.g. api which will result in api.vegan.pizza
  • meta.record_ttl:string - (Optional) Valid TTL value which will be used for the A record. e.g. 600 - 10 minutes

For an exmaple please refer to test/web-service.json. And DNSimple Provider.

Developing the Provider

Please refer to CONTRIBUTING.md.

Requirements

Name Version
dnsimple >= 0.11.x

Providers

Name Version
dnsimple >= 0.11.x

Modules

No modules.

Resources

Name Type
dnsimple_zone_record.records_a resource

Inputs

Name Description Type Default Required
dnsimple_account The DNSimple account ID string n/a yes
dnsimple_sandbox If true, use the sandbox API endpoint bool n/a yes
dnsimple_token The API token used by DNSimple provider string n/a yes
services Consul services monitored by Consul NIA
map(
object({
id = string
name = string
address = string
port = number
meta = map(string)
tags = list(string)
namespace = string
status = string

node = string
node_id = string
node_address = string
node_datacenter = string
node_tagged_addresses = map(string)
node_meta = map(string)
})
)
n/a yes

Outputs

Name Description
service_map n/a

About

DNSimple Consult-Terraform-Sync NIA integration to manage your DNS records.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 84.7%
  • Shell 15.3%