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

Add option to disable SPF TXT record #23

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Add option to disable SPF TXT record #23

merged 1 commit into from
Nov 18, 2024

Conversation

fmasuhr
Copy link
Member

@fmasuhr fmasuhr commented Nov 18, 2024

Adding configure_spf variable to allow disabling the SPF TXT record. This way the TXT record can be managed outside of the module.

This change will re-create the TXT record as it now is using count

@fmasuhr fmasuhr requested a review from a team November 18, 2024 10:59
@fmasuhr fmasuhr self-assigned this Nov 18, 2024
@fmasuhr fmasuhr added the minor label Nov 18, 2024
Copy link

@asayed94 asayed94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @fmasuhr I think this could solve the problem for forcing new SPF records

@awendt
Copy link
Contributor

awendt commented Nov 18, 2024

This means we'll end up with 2 types of consumer modules, and the responsibility for the SPF record will always be shared.

We can force the responsibility to always be with the module if we make an array of domains configurable:

# variables.tf
variable "spf_additional_domain_names" {
  type    = list(string)
  default = []

  description = <<EOS
Domain names to be included in the SPF record.
EOS
}

When I specify spf_additional_domain_names = ["emarsys.us"], the module could end up creating the SPF record: v=spf1 include:amazonses.com include:emarsys.us ~all

@fmasuhr What do you think?

@jansiwy
Copy link
Member

jansiwy commented Nov 18, 2024

@awendt By design, an SPF record is not specific a specific ESP. It only work for simples cases with one ESP per domain. Thus, a module for a specific ESP should not pretend, that it's always responsible for the SPF record (this would obviously clash if modules for different ESPs would both apply that pattern).

@fmasuhr fmasuhr merged commit 76270f1 into main Nov 18, 2024
5 checks passed
@fmasuhr fmasuhr deleted the configure-spf branch November 18, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

4 participants