AWS SNS topic with SMS as protocol

452 views
Skip to first unread message

Kiefer Smith

unread,
May 24, 2019, 1:20:27 PM5/24/19
to Terraform
Hello,

I am trying to create an Amazon SNS topic so that I might receive alerts via SMS if/when my Lambda functions fail.  Below are the resources I am trying to create.

resource "aws_sns_topic" "techdb_lambda_alerts" {
  name
= "techdb_lambda_alerts"
}


resource
"aws_sns_topic_subscription" "techdb_email_alerts_sub" {
  topic_arn
= "${aws_sns_topic.techdb_lambda_alerts.arn}"
  protocol
= "sms"
  endpoint
= "${var.alerting_phone_list}"
  depends_on
= ["aws_sns_topic.techdb_lambda_alerts"]
}

When I attempt a `terraform apply` I am met with the following error:

* module.lambda.aws_sns_topic_subscription.techdb_email_alerts_sub: 1 error(s) occurred:

* aws_sns_topic_subscription.techdb_email_alerts_sub: Error creating SNS topic: InvalidParameter: Invalid parameter: Invalid protocol type: sms
    status code
: 400, request id: 4eef312e-9376-5b9f-ace5-644cb5e8f3b4

This leads me to believe that SMS is not allowed as a protocol, but the documentation clearly states that it is supported.

Am I  missing something?  Is my Terraform just wrong?

Thank you in advance.

Best,

Kiefer Smith

CHUA Chee Wee

unread,
May 24, 2019, 2:13:47 PM5/24/19
to terrafo...@googlegroups.com
Hi,

Sms is supported. I got it working when I was working on it.

Something is probably wrong with your Terraform code.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/4b41c31d-5390-458e-bc5e-e9309a2ec0a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kiefer Smith

unread,
May 24, 2019, 2:19:52 PM5/24/19
to terrafo...@googlegroups.com
Can you share the code that you used to get it to work?

Thanks,

Kiefer Smith
Site Reliability Engineer
kiefer...@klarrio.com
+1 919 274 0410


Reply all
Reply to author
Forward
0 new messages