FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

google_dns_record_set

Manages a set of DNS records within Google Cloud DNS.

Example Usage

This example is the common case of binding a DNS name to the ephemeral IP of a new instance:

resource "google_compute_instance" "frontend" {
  name         = "frontend"
  machine_type = "g1-small"
  zone         = "us-central1-b"

  disk {
    image = "debian-cloud/debian-8"
  }

  network_interface {
    network = "default"
    access_config {}
  }
}
resource "google_dns_managed_zone" "prod" {
  name     = "prod-zone"
  dns_name = "prod.mydomain.com."
}

resource "google_dns_record_set" "frontend" {
  name = "frontend.${google_dns_managed_zone.prod.dns_name}"
  type = "A"
  ttl  = 300

  managed_zone = "${google_dns_managed_zone.prod.name}"

  rrdatas = ["${google_compute_instance.frontend.network_interface.0.access_config.0.assigned_nat_ip}"]
}

Argument Reference

The following arguments are supported:


Attributes Reference

Only the arguments listed above are exposed as attributes.


See the source of this document at Terraform.io