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

Domain Sending Key Support #23

Open
addshore opened this issue Oct 12, 2021 · 5 comments
Open

Domain Sending Key Support #23

addshore opened this issue Oct 12, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@addshore
Copy link

Hi there,

Terraform Version

1.0.8

Affected Resource(s)

Mailgun

Expected Behaviour

Mailgun allows you to create individual domain targeted api keys.
I would like to be able to create and revoke these for domains that have been created.

Actual Behaviour

This feature is not currently supported.

References

Domain Sending Keys announcement https://www.mailgun.com/blog/mailgun-ip-pools-domain-keys/
Docs https://documentation.mailgun.com/en/latest/api-intro.html?highlight=domain%20sending%20key#authentication

@wgebis wgebis added the enhancement New feature or request label Oct 14, 2021
@mathportillo
Copy link

It looks like mailgun api still does not support for creating domain sending keys.

An alternative is to use smtp.

@Chupaka
Copy link

Chupaka commented Oct 26, 2021

Yep, they do not support Sending API Keys creation via API (just chatted with MailGun support).

They recommend requesting this API via https://feedback.mailgun.com/

@addshore
Copy link
Author

For now for our use we will switch to SMTP, but leave this open and also plan on reaching out to the feedback form.
Thanks for the comments.

@terah
Copy link

terah commented Aug 30, 2022

I'm not sure if this is the same issue but I'm looking to generate a password as push it into the email domain:

resource "random_string" "email-password" {
  length           = 31
  special          = false
}

resource "mailgun_domain" "email-domain" {
  provider = mailgun.api
  name          = var.tenancy
  region        = "us"
  spam_action   = "disabled"
  smtp_password   = random_string.email-password.result
  dkim_key_size   = 1024
}

When ever re-run terraform I get the following error which, to me, indicates that the provider is trying to update the password every time whether it's changed or not:

Error: UnexpectedResponseError URL=https://api.mailgun.net/v3/domains/foobar.com/credentials/[email protected] ExpectedOneOf=[]int{200, 202, 204} Got=400 Error: {
│   "message": "New password cannot be the same as old password."
│ }

@guillaumekh
Copy link

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

No branches or pull requests

6 participants