A Terraform provider for the VinylDNS DNS as a service API.
Full documentation is available at https://vinyldns.github.io/terraform-provider-vinyldns
Add the VinylDNS provider to your Terraform configuration:
terraform {
required_providers {
vinyldns = {
source = "vinyldns/vinyldns"
}
}
}
provider "vinyldns" {
# Configure via environment variables (recommended):
# VINYLDNS_HOST
# VINYLDNS_ACCESS_KEY
# VINYLDNS_SECRET_KEY
}# Create a group to administer the zone
resource "vinyldns_group" "example" {
name = "example-group"
email = "dns-team@example.com"
member_ids = ["user-id-1"]
admin_ids = ["user-id-1"]
}
# Create a zone
resource "vinyldns_zone" "example" {
name = "example.com."
email = "hostmaster@example.com"
admin_group_id = vinyldns_group.example.id
}
# Create a DNS record
resource "vinyldns_record_set" "www" {
name = "www"
zone_id = vinyldns_zone.example.id
type = "A"
ttl = 300
record_addresses = ["192.0.2.1"]
}vinyldns_group- Manage VinylDNS groupsvinyldns_zone- Manage DNS zonesvinyldns_record_set- Manage DNS records
vinyldns_zone- Look up a zone by namevinyldns_zones- List zones with optional filteringvinyldns_group- Look up a group by namevinyldns_groups- List groups with optional filteringvinyldns_record_sets- List record sets in a zonevinyldns_backend_ids- List available DNS backend IDs (for zone references; backends are managed outside Terraform)
See the examples directory for complete working examples:
- Provider configuration
- Resource examples
- Data source examples
- Scenario: Basic zone setup
- Scenario: Complete zone setup
git clone https://github.com/vinyldns/terraform-provider-vinyldns.git
cd terraform-provider-vinyldns
make installUse the local provider in your configuration:
terraform {
required_providers {
vinyldns = {
source = "local/vinyldns-provider/vinyldns"
version = "0.0.1"
}
}
}Tests require a VinylDNS API running on localhost:9000. This is handled automatically via Docker:
make testmake buildSee CONTRIBUTING.md for contribution guidelines.
Apache 2.0 - See LICENSE for details.
terraform-provider-vinyldns would not be possible without the help of many other pieces of open source software. Thank
you open source world!
Given the Apache 2.0 license of terraform-provider-vinyldns, we specifically want to call out the following packages
and their corresponding licenses:
- github.com/hashicorp/errwrap - Mozilla Public License 2.0
- github.com/hashicorp/go-getter - Mozilla Public License 2.0
- github.com/hashicorp/go-multierror - Mozilla Public License 2.0
- github.com/hashicorp/go-plugin - Mozilla Public License 2.0
- github.com/hashicorp/go-uuid - Mozilla Public License 2.0
- github.com/hashicorp/go-version - Mozilla Public License 2.0
- github.com/hashicorp/hcl - Mozilla Public License 2.0
- github.com/hashicorp/hil - Mozilla Public License 2.0
- github.com/hashicorp/logutils - Mozilla Public License 2.0
- github.com/hashicorp/terraform - Mozilla Public License 2.0
- github.com/hashicorp/yamux - Mozilla Public License 2.0