Code Monkey home page Code Monkey logo

terraform-aws-ses's Introduction

Banner

Terraform AWS SES

With our comprehensive DevOps toolkit - streamline operations, automate workflows, enhance collaboration and, most importantly, deploy with confidence.

Terraform Licence tfsec static-checks


We are a group of DevOps engineers & architects, joining hands in this ever evolving digital landscape. With our strong belief in Automation; just like microservices, always on the lookout to split the the infrastructure into smaller connected resources (database, cluster and more) which could be standardized, are manageable, scalable, secure & follow industry best practices.

This module includes Terraform open source, examples, and automation tests (for better understanding), which would help you create and improve your infrastructure with minimalistic coding.

Prerequisites and Providers

This table contains both Prerequisites and Providers:

Description Name Version
Prerequisite Terraform >= 1.6.5
Provider aws >= 5.30.0

Examples

IMPORTANT: Since the master branch used in source varies based on new modifications, we recommend using the release versions.

πŸ“Œ For additional usage examples, check the complete list under examples/ directory.

Inputs and Outputs

Refer to complete documentation: here

Module Dependencies

This module has dependencies on:

πŸ“‘ Changelog

Refer here.

✨ Contributors

Big thanks to our contributors for elevating our project with their dedication and expertise! But, we do not wish to stop there, would like to invite contributions from the community in improving these projects and making them more versatile for better reach. Remember, every bit of contribution is immensely valuable, as, together, we are moving in only 1 direction, i.e. forward.



If you're considering contributing to our project, here are a few quick guidelines that we have been following (Got a suggestion? We are all ears!):

  • Fork the Repository: Create a new branch for your feature or bug fix.
  • Coding Standards: You know the drill.
  • Clear Commit Messages: Write clear and concise commit messages to facilitate understanding.
  • Thorough Testing: Test your changes thoroughly before submitting a pull request.
  • Documentation Updates: Include relevant documentation updates if your changes impact it.

Feedback

Spot a bug or have thoughts to share with us? Let's squash it together! Log it in our issue tracker, feel free to drop us an email at [email protected].

Show some love with a β˜… on our GitHub! if our work has brightened your day! – your feedback fuels our journey!

πŸš€ Our Accomplishment

We have 100+ Terraform modules πŸ™Œ. You could consider them finished, but, with enthusiasts like yourself, we are able to ever improve them, so we call our status - improvement in progress.

Join Our Slack Community

Join our vibrant open-source slack community and embark on an ever-evolving journey with CloudDrove; helping you in moving upwards in your career path. Join our vibrant Open Source Slack Community and embark on a learning journey with CloudDrove. Grow with us in the world of DevOps and set your career on a path of consistency.

πŸŒπŸ’¬What you'll get after joining this Slack community:

  • πŸš€ Encouragement to upgrade your best version.
  • 🌈 Learning companionship with our DevOps squad.
  • 🌱 Relentless growth with daily updates on new advancements in technologies.

Join our tech elites Join Now πŸš€

Explore Our Blogs

Click here πŸ“š 🌟

Tap into our capabilities

We provide a platform for organizations to engage with experienced top-tier DevOps & Cloud services. Tap into our pool of certified engineers and architects to elevate your DevOps and Cloud Solutions.

At CloudDrove, has extensive experience in designing, building & migrating environments, securing, consulting, monitoring, optimizing, automating, and maintaining complex and large modern systems. With remarkable client footprints in American & European corridors, our certified architects & engineers are ready to serve you as per your requirements & schedule. Write to us at [email protected].

We are The Cloud Experts!


We ❀️ Open Source and you can check out our other modules to get help with your new Cloud ideas.

terraform-aws-ses's People

Contributors

agconti avatar anmolnagpal avatar clouddrove-ci avatar himanshu-uniyal avatar joe-niland avatar nileshgadgi avatar omsharma07 avatar rowrowrowrow avatar sohanyadav avatar stefanwb avatar tanveer143s avatar themaniskshah avatar theprashantyadav avatar vaibhav7797 avatar vishwajitnagulkar avatar yadavprakash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

terraform-aws-ses's Issues

IAM user credentials

Please add the IAM user access key ID and secret key to outputs or make it possible to put them somewhere, for example, into the parameter store.

output "iam_access_key_secret" {
  description = "The access key secret"
  value       = try(aws_iam_access_key.default[0].secret, "")
  sensitive   = true
}
output "iam_access_key_id" {
  description = "The access key ID"
  value       = try(aws_iam_access_key.default[0].id, "")
}

or

module "ssm_keys" {
  source  = "zahornyak/multiple-ssm-parameters/aws"
  version = "0.0.13"

  parameter_prefix = "/${var.iam_name}/"

  parameters = {
    ses_user_access_key = {
      value = aws_iam_access_key.default[0].id
    }
    ses_user_secret_key = {
      value = aws_iam_access_key.default[0].secret
    }
  }
}

Redundant Verification Resources

AWS has the following announcement on their SES dashboards:

Domain verification in Amazon SES is now based on DomainKeys Identified Mail (DKIM), an email authentication standard that receiving mail servers use to validate an email’s authenticity. Configuring DKIM in your domain’s DNS settings confirms to SES that you’re the identity owner, eliminating the need for TXT records. Domain identities that were verified using TXT records do not need to be reverified; however, we still recommend enabling DKIM signatures to enhance the deliverability of your mail with DKIM-compliant email providers. To access your legacy TXT records, download Legacy TXT record set as .csv <>.

Based on this it is possible to delete the following resources:

  • resource "aws_ses_domain_identity_verification" "default"
  • resource "aws_route53_record" "ses_verification"

I have tested this with my own domains to confirm that they remain verified even with these resources removed.

aws_ses_domain_identity.default is tuple with 1 element

Hello,

Trying to enable mail from domain to use mail.example.com

Example

module "example_ses" {
  source  = "registry.terraform.io/clouddrove/ses/aws"
  version = "1.0.1"

  enable_domain = true
  domain        = "example.com"

  enable_mail_from = true
  mail_from_domain = "mail.example.com"

  enable_verification = true
  enable_mx           = true
  enable_spf_domain   = true

  cname_type = "CNAME"
  mx_type    = "MX"
  txt_type   = "TXT"
  zone_id    = data.aws_route53_zone.selected.id
}

## SES Policy
data "aws_iam_policy_document" "example_ses_policy" {
  statement {
    actions   = ["SES:SendEmail", "SES:SendRawEmail"]
    resources = [module.example_ses.domain_identity_arn]

    principals {
      type = "AWS"
      identifiers = [
        data.terraform_remote_state.dev_account.outputs.account_id,
        data.terraform_remote_state.stg_account.outputs.account_id
      ]
    }
  }
}

resource "aws_ses_identity_policy" "example_ses_identity_policy" {
  identity = module.example_ses.domain_identity_arn
  name     = "allow-account-id"
  policy   = data.aws_iam_policy_document.example_ses_policy.json
}

Error:

β”‚ Error: Incorrect attribute value type
β”‚ 
β”‚   on .terraform/modules/example_ses/main.tf line 66, in resource "aws_ses_domain_mail_from" "default":
β”‚   66:   domain           = aws_ses_domain_identity.default.*.domain
β”‚     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     β”‚ aws_ses_domain_identity.default is tuple with 1 element
β”‚ 
β”‚ Inappropriate value for attribute "domain": string required.

I am sure not a bug and doing something wrong here.
Thanks

Issue with Route53

I'm always getting this issue:

β”‚ Error: creating Route 53 Record: InvalidChangeBatch: [Tried to create resource record set [name='mydomain.dev.', type='TXT'] but it already exists]
β”‚       status code: 400, request id: xx-xx-xx-xx-xxxx
β”‚ 
β”‚   with module.mydomain_dev_ses.aws_route53_record.ses_verification[0],
β”‚   on ../modules/aws-ses/main.tf line 49, in resource "aws_route53_record" "ses_verification":
β”‚   49: resource "aws_route53_record" "ses_verification" {
β”‚ 

The resource doesn't exist. It's probably not iterated right.

Has anyone run into this? I'm still figuring out how to solve it.

Edit: hashicorp/terraform-provider-aws#12322 It's a known issue with the plugin.

Add the ability to send a list of arns for the default domain policy

looking for a simple fix to allow the IaC to send a list of arns for the default policy, i had a branch with the change but unable to push to the repo.

here is the change i did locally

data "aws_iam_policy_document" "document" {
  count = var.enabled && var.enable_domain ? 1 : 0
  statement {
    actions   = ["SES:SendEmail", "SES:SendRawEmail"]
    resources = [aws_ses_domain_identity.default[0].arn]
    principals {
      identifiers = var.domain_policy_arns
      type        = "AWS"
    }
  }
}

and the new variable that defaults to the original value

variable "domain_policy_arns" {
  type        = list(string)
  default     = ["*"]
  description = "(Optional) A list of AWS arns allowed to send email through SES."
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.