Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- resource "mailgun_domain" "example_mailing_domain" {
- name = "m.example.com"
- spam_action = "disabled"
- smtp_password = "strong_password"
- }
- resource "cloudflare_record" "mail-receiving-dns-entry" {
- count = 2
- domain = "${cloudflare_zone.my_domain_entry.zone}"
- type = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "record_type")}"
- name = "${mailgun_domain.example_mailing_domain.name}."
- value = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "value")}"
- priority = "${lookup(mailgun_domain.example_mailing_domain.receiving_records[count.index], "priority")}"
- }
- resource "cloudflare_record" "mail-sending-dns-entry" {
- count = 3
- domain = "${cloudflare_zone.my_domain_entry.zone}"
- type = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "record_type")}"
- name = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "name")}."
- value = "${lookup(mailgun_domain.example_mailing_domain.sending_records[count.index], "value")}"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement