diff --git a/infra/terraform/modules/ses_smtp_user/inputs.tf b/infra/terraform/modules/ses_smtp_user/inputs.tf new file mode 100644 index 000000000..4692095de --- /dev/null +++ b/infra/terraform/modules/ses_smtp_user/inputs.tf @@ -0,0 +1,3 @@ +variable "ses_domain_identity_arn" {} + +variable "username" {} diff --git a/infra/terraform/modules/ses_smtp_user/main.tf b/infra/terraform/modules/ses_smtp_user/main.tf new file mode 100644 index 000000000..baa73224a --- /dev/null +++ b/infra/terraform/modules/ses_smtp_user/main.tf @@ -0,0 +1,28 @@ +resource "aws_iam_user" "smtp_user" { + name = "${var.username}" +} + +resource "aws_iam_access_key" "access_key" { + user = "${aws_iam_user.smtp_user.name}" +} + +resource "aws_iam_user_policy" "smtp_user_policy" { + name = "${aws_iam_user.smtp_user.name}_policy" + user = "${aws_iam_user.smtp_user.name}" + + policy = <