github.com/candidpartners/terraform@v0.9.5-0.20171005231213-29f5f88820f6/examples/cross-provider/main.tf (about) 1 # Create our Heroku application. Heroku will 2 # automatically assign a name. 3 resource "heroku_app" "web" {} 4 5 # Create our DNSimple record to point to the 6 # heroku application. 7 resource "dnsimple_record" "web" { 8 domain = "${var.dnsimple_domain}" 9 10 name = "terraform" 11 12 # heroku_hostname is a computed attribute on the heroku 13 # application we can use to determine the hostname 14 value = "${heroku_app.web.heroku_hostname}" 15 16 type = "CNAME" 17 ttl = 3600 18 } 19 20 # The Heroku domain, which will be created and added 21 # to the heroku application after we have assigned the domain 22 # in DNSimple 23 resource "heroku_domain" "foobar" { 24 app = "${heroku_app.web.name}" 25 hostname = "${dnsimple_record.web.hostname}" 26 }