_This issue was originally opened by @ksperling as hashicorp/terraform#11232. It was migrated here as part of the provider split. The original body of the issue is below._
It would be great if sending functionality could be provisioned via terraform as well, specifically creation of domain and email identities and configuration sets.
There are a number of up-votes for this on https://github.com/hashicorp/terraform/issues/6771#issuecomment-250381602 but since that's a closed issue I thought it's better to open a separate one.
I believe this is now implemented, except for DKIM records retrieval (tracked as https://github.com/terraform-providers/terraform-provider-aws/issues/1347)
@synchrone, how is this implement? I mean, I don't see any aws_ses_email_identity
in the documentation.
Ah, you want to add the identities with terraform. I overlooked that one.
double thinking it, is not a good idea... there's no advantage at all, you still have to verify that the email exists and if other applications use the same identity ([email protected]
) it would crash, as the record already exists.
I have a use case, where we have Terraform handling multiple AWS Accounts for different environments, and would like a consistent way to populate SES with Email Address Identities.
They will still need to be verified, but it is nice when we are provisioning a new environment,
or adding a new employee who needs to be verified in all AWS accounts.
This appears to be possible through the AWS CLI: https://docs.aws.amazon.com/cli/latest/reference/ses/verify-email-identity.html
And through the Go SDK: https://docs.aws.amazon.com/sdk-for-go/api/service/ses/#SES.VerifyEmailIdentity
And for listing identities: https://docs.aws.amazon.com/sdk-for-go/api/service/ses/#SES.ListIdentities
Another thing to think about would be what happens when you try to re-add an identity that already exists. It appears this doesn't fail, but instead generates an e-mail notification to validate the user again.
Also, when listing current identities, it doesn't appear possible (at a quick glance) to see which ones are pending or verified.
Just ran into this problem just now! I guess the answer for now is to populate this ourselves.
The aws_ses_email_identity
resource has been merged and will be released with version 2.11.0 of the Terraform AWS provider, later this week.
The new aws_ses_email_identity
resource has been released in version 2.11.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 for triage. Thanks!
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
I have a use case, where we have Terraform handling multiple AWS Accounts for different environments, and would like a consistent way to populate SES with Email Address Identities.
They will still need to be verified, but it is nice when we are provisioning a new environment,
or adding a new employee who needs to be verified in all AWS accounts.