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

Allow setting custom domain for click/open tracking as part of SES Event destination resource #6339

Closed
nirojan opened this issue Nov 2, 2018 · 9 comments · Fixed by #26032
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ses Issues and PRs that pertain to the ses service.
Milestone

Comments

@nirojan
Copy link

nirojan commented Nov 2, 2018

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

AWS SES allows the use of custom domain for email open and link click tracking instead of AWS's own domain (random-subdomain.awstrack.me). This is set as part of setting up event destination resource (aws_ses_event_destination) as an additional parameter. Terraform at the moment doesn't support setting this variable but it would be good if it does.

New or Affected Resource(s)

  • aws_ses_event_destination

Potential Terraform Configuration

resource "aws_route53_record" "domain_verification" {
  zone_id = "${aws_route53_zone.domain.zone_id}"
  name    = "click.example.com"
  type    = "CNAME"
  ttl     = "3600"
  records = ["r.eu-west-1.awstrack.me"]
}

resource "aws_ses_configuration_set" "config-set" {
  name = "ses-events-cloudwatch"
}

resource "aws_ses_event_destination" "cloudwatch" {
  name                   = "event-destination-cloudwatch"
  configuration_set_name = "${aws_ses_configuration_set.config-set.name}"
  enabled                = true
  matching_types         = ["open", "click"]

/* Setting the custom domain for open/click tracking.
The domain has to be a verified domain identity or subdomain of an existing verified domain */

  domain = "click.example.com"

  cloudwatch_destination = {
    default_value  = "default"
    dimension_name = "ses-events"
    value_source   = "emailHeader"
  }
}

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/ses Issues and PRs that pertain to the ses service. labels Nov 2, 2018
@punitrathore
Copy link

👍

1 similar comment
@manishapme
Copy link

👍

@vukomir
Copy link

vukomir commented Feb 21, 2020

any update on this? :)

@marns93
Copy link

marns93 commented Jan 21, 2021

Are there any updates? :)

@borfig
Copy link

borfig commented May 7, 2021

Actually, API-wise, the configuration set tracking options are a separate singleton resource that depends on the configuration set:

However, viewing the current state is describing the configuration set and asking for the tracking options: https://docs.aws.amazon.com/ses/latest/APIReference/API_DescribeConfigurationSet.html

In terraform, it should be configured as an optional block of configuration set, like this:

resource "aws_ses_configuration_set" "example" {
  name = "Example"
  tracking_options {
    custom_redirect_domain = "track.example.com"
  }
}

Note: when tracking options are used, it must also depend (via depends_on) on aws_ses_domain_identity_verification.

@brunocalogero
Copy link
Contributor

Any update on this?

@brunocalogero
Copy link
Contributor

brunocalogero commented Jul 1, 2021

So @safinn and I opened a draft pull request for this, it's still in its infancy (need to add tests and probably some more documentation), make sure to thumbs up the PR for prioritisation :) this is based on top of the suggestions made by @borfig.

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This functionality has been released in v4.24.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ses Issues and PRs that pertain to the ses service.
Projects
None yet
10 participants