· 9 years ago · Dec 20, 2016, 06:28 AM
1# /path/to/main.tf
2
3variable "aws_access_key" {}
4
5variable "aws_secret_key" {}
6
7provider "aws" {
8 access_key = "${var.aws_access_key}"
9 secret_key = "${var.aws_secret_key}"
10 region = "ap-northeast-1"
11}
12
13resource "aws_sns_topic" "test1" {
14 name = "test1"
15}
16
17resource "aws_sns_topic" "test2" {
18 name = "test2"
19}
20
21module "sns_subscription_to_lambda" {
22 source = "./module"
23
24 topic_arns = [
25 "${aws_sns_topic.test1.arn}",
26 "${aws_sns_topic.test2.arn}",
27 ]
28}