Possible to create AWS DynamoDB Event source from Terraform?

920 views
Skip to first unread message

wi...@elevatedirect.com

unread,
Dec 7, 2015, 4:02:49 AM12/7/15
to Terraform
I'm setting up a configuration where updates in a DynamoDB trigger a Lambda function. All steps work except initializing an event source aka trigger. 

Workaround is to manually create the trigger and hardcoded that in the terraform config.

Should this be possible from terraform?

Paul Hinze

unread,
Dec 7, 2015, 9:03:02 AM12/7/15
to terrafo...@googlegroups.com
Hi there,

Should this be possible from terraform?

Yep! I believe `aws_lambda_event_source_mapping` should do it:


Hope this helps!

Paul

--
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/95fe49dd-ab20-44b4-acbb-3ada4a63bdab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wi...@elevatedirect.com

unread,
Dec 7, 2015, 9:17:44 AM12/7/15
to Terraform
Hi Paul,


Should this be possible from terraform?

Yep! I believe `aws_lambda_event_source_mapping` should do it:


I have the mapping, but I need the stream aka event source aka trigger:
In the example, the ARN is:
event_source_arn = "arn:aws:kinesis:REGION:123456789012:stream/stream_name" 

When I create the DynamoDB using Terraform, there is a table without the stream/trigger.

When I create the mapping, I need to provide the name of a stream. So far, the only way I got this to work is to manually create a stream and put that in the config.


Paul Hinze

unread,
Dec 7, 2015, 9:25:29 AM12/7/15
to terrafo...@googlegroups.com
Aha - thanks for the clarification!

Yep you're right - looks like we need to support a few new attributes on aws_dynamodb_table for this to work in Terraform

--
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.
Reply all
Reply to author
Forward
0 new messages