From 963586bb610d9c41b25971974f86f6f85a3ae71a Mon Sep 17 00:00:00 2001 From: Sven Lito Date: Tue, 23 Mar 2021 22:49:54 +0700 Subject: [PATCH] chore(misc): checkpoint --- examples/complete/README.md | 3 +++ main.tf | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/complete/README.md b/examples/complete/README.md index 7bd5d0b..ec190b4 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -42,7 +42,10 @@ Note that this example may create resources which cost money. Run `terraform des |------| | [aws_cloudwatch_log_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | | [aws_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | +| [aws_iam_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | +| [aws_kinesis_firehose_delivery_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_firehose_delivery_stream) | | [aws_kinesis_stream](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_stream) | +| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket) | | [aws_sqs_queue](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue) | | [aws_sqs_queue_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sqs_queue_policy) | | [random_pet](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/pet) | diff --git a/main.tf b/main.tf index ecd874b..ee3e657 100644 --- a/main.tf +++ b/main.tf @@ -160,7 +160,7 @@ resource "aws_cloudwatch_event_permission" "this" { for permission in var.permission_config : permission.statement_id => permission } : {} - principal = each.value.account_id - statement_id = each.value.statement_id + principal = lookup(each.value, "account_id", null) + statement_id = lookup(each.value, "statement_id", null) event_bus_name = lookup(each.value, aws_cloudwatch_event_bus.this[0].name, null) == null ? aws_cloudwatch_event_bus.this[0].name : null }