SHARE
TWEET

Untitled

a guest Jul 19th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. resource "mailgun_domain" "example_mailing_domain" {
  2.  name          = "m.example.com"
  3.  spam_action   = "disabled"
  4.  smtp_password = "strong_password"
  5. }
  6.  
  7. resource "cloudflare_record" "mail-receiving-dns-entry" {
  8.  count = 2
  9.  domain = "${cloudflare_zone.my_domain_entry.zone}"
  10.  type   = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "record_type")}"
  11.  name   = "${mailgun_domain.example_mailing_domain.name}."
  12.  value  = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "value")}"
  13.  priority = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "priority")}"
  14. }
  15.  
  16. resource "cloudflare_record" "mail-sending-dns-entry" {
  17.  count = 3
  18.  domain = "${cloudflare_zone.my_domain_entry.zone}"
  19.  type   = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "record_type")}"
  20.  name   = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "name")}."
  21.  value  = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "value")}"
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top