Skip to content

Commit

Permalink
chore: Updated versions in README
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbabenko committed Apr 28, 2021
1 parent fe79362 commit 5832e7c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
8 changes: 4 additions & 4 deletions examples/notification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Note that this example may create resources which cost money. Run `terraform des
| Name | Source | Version |
|------|--------|---------|
| <a name="module_all_notifications"></a> [all\_notifications](#module\_all\_notifications) | ../../modules/notification | |
| <a name="module_lambda_function1"></a> [lambda\_function1](#module\_lambda\_function1) | terraform-aws-modules/lambda/aws | ~> 1.0 |
| <a name="module_lambda_function2"></a> [lambda\_function2](#module\_lambda\_function2) | terraform-aws-modules/lambda/aws | ~> 1.0 |
| <a name="module_lambda_function1"></a> [lambda\_function1](#module\_lambda\_function1) | terraform-aws-modules/lambda/aws | ~> 2.0 |
| <a name="module_lambda_function2"></a> [lambda\_function2](#module\_lambda\_function2) | terraform-aws-modules/lambda/aws | ~> 2.0 |
| <a name="module_s3_bucket"></a> [s3\_bucket](#module\_s3\_bucket) | ../../ | |
| <a name="module_sns_topic1"></a> [sns\_topic1](#module\_sns\_topic1) | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | |
| <a name="module_sns_topic2"></a> [sns\_topic2](#module\_sns\_topic2) | terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic | |
| <a name="module_sns_topic1"></a> [sns\_topic1](#module\_sns\_topic1) | terraform-aws-modules/sns/aws | ~> 3.0 |
| <a name="module_sns_topic2"></a> [sns\_topic2](#module\_sns\_topic2) | terraform-aws-modules/sns/aws | ~> 3.0 |

## Resources

Expand Down
26 changes: 16 additions & 10 deletions examples/notification/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "null_resource" "download_package" {

module "lambda_function1" {
source = "terraform-aws-modules/lambda/aws"
version = "~> 1.0"
version = "~> 2.0"

function_name = "${random_pet.this.id}-lambda1"
handler = "index.lambda_handler"
Expand All @@ -46,7 +46,7 @@ module "lambda_function1" {

module "lambda_function2" {
source = "terraform-aws-modules/lambda/aws"
version = "~> 1.0"
version = "~> 2.0"

function_name = "${random_pet.this.id}-lambda2"
handler = "index.lambda_handler"
Expand All @@ -57,11 +57,17 @@ module "lambda_function2" {
}

module "sns_topic1" {
source = "terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic"
source = "terraform-aws-modules/sns/aws"
version = "~> 3.0"

name_prefix = "${random_pet.this.id}-2"
}

module "sns_topic2" {
source = "terraform-aws-modules/cloudwatch/aws//examples/fixtures/aws_sns_topic"
source = "terraform-aws-modules/sns/aws"
version = "~> 3.0"

name_prefix = "${random_pet.this.id}-2"
}

resource "aws_sqs_queue" "this" {
Expand Down Expand Up @@ -98,16 +104,16 @@ module "all_notifications" {

lambda_notifications = {
lambda1 = {
function_arn = module.lambda_function1.this_lambda_function_arn
function_name = module.lambda_function1.this_lambda_function_name
function_arn = module.lambda_function1.lambda_function_arn
function_name = module.lambda_function1.lambda_function_name
events = ["s3:ObjectCreated:Put"]
filter_prefix = "prefix/"
filter_suffix = ".json"
}

lambda2 = {
function_arn = module.lambda_function2.this_lambda_function_arn
function_name = module.lambda_function2.this_lambda_function_name
function_arn = module.lambda_function2.lambda_function_arn
function_name = module.lambda_function2.lambda_function_name
events = ["s3:ObjectCreated:Post"]
}
}
Expand All @@ -130,14 +136,14 @@ module "all_notifications" {

sns_notifications = {
sns1 = {
topic_arn = module.sns_topic1.this_sns_topic_arn
topic_arn = module.sns_topic1.sns_topic_arn
events = ["s3:ObjectRemoved:Delete"]
filter_prefix = "prefix3/"
filter_suffix = ".csv"
}

sns2 = {
topic_arn = module.sns_topic2.this_sns_topic_arn
topic_arn = module.sns_topic2.sns_topic_arn
events = ["s3:ObjectRemoved:DeleteMarkerCreated"]
}
}
Expand Down

0 comments on commit 5832e7c

Please sign in to comment.