Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove provider, make spf and dkim optional #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sandipb
Copy link

@sandipb sandipb commented Dec 26, 2022

  • I removed the provider section because the latest terraform is throwing errors for modules which have their own provider section
  • I made the spf/dkim records optional (defaulting to adding them). I had a requirement where I wanted to use this module for fastmail's incredibly useful wildcard domain feature(sending mail to abc@xyz.domain goes to xyz+abc@domain), but I just wanted mx records and not spf/dkim. So I could do:
module "fastmail-mx" {
  source = "github.com/sandipb/terraform-cloudflare-fastmail-mx.git?ref=remove_provider"
  for_each = {
    root     = { sub_domain = "@", dkim_enable = true, spf_enable = true },
    wildcard = { sub_domain = "*", dkim_enable = false, spf_enable = false }
  }
  cf_zone_id   = data.cloudflare_zone.sandipb_dev.id
  cf_api_token = var.cf_api_token
  domain_name  = data.cloudflare_zone.sandipb_dev.name
  sub_domain   = each.value.sub_domain
  dkim_enable   = each.value.dkim_enable
  spf_enable   = each.value.spf_enable
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant