Skip to content

Commit

Permalink
- flowlogs
Browse files Browse the repository at this point in the history
  - remove iam_role_arn for s3 log destinations to avoid this error:
    Error: creating Flow Log (vpc-0f791ea1e2bb46924): InvalidParameter: DeliverLogsPermissionArn is not applicable for s3 delivery
  • Loading branch information
badra001 committed Feb 24, 2023
1 parent d763a38 commit 21b76d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,7 @@
* 2.6.0 -- 2023-02-24
- share-resources: new submodule

* 2.6.1 -- 2023-02-24
- flowlogs
- remove iam_role_arn for s3 log destinations to avoid this error:
Error: creating Flow Log (vpc-0f791ea1e2bb46924): InvalidParameter: DeliverLogsPermissionArn is not applicable for s3 delivery
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
_module_version = "2.6.0"
_module_version = "2.6.1"
_module_names = {
"_main_" = "aws-vpc-setup"

Expand Down
12 changes: 6 additions & 6 deletions flowlogs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ resource "aws_flow_log" "flowlog_public" {
for_each = toset(local.public_ids)
log_destination = format("%v/%v-%v/", var.flowlog_bucket_arn, var.vpc_full_name, "public")
log_destination_type = "s3"
iam_role_arn = var.flowlog_role_arn
traffic_type = "ALL"
subnet_id = each.key
# iam_role_arn = var.flowlog_role_arn
traffic_type = "ALL"
subnet_id = each.key

tags = merge(
local.base_tags,
Expand All @@ -81,9 +81,9 @@ resource "aws_flow_log" "flowlog_public" {
resource "aws_flow_log" "flowlog" {
log_destination = format("%v/%v/", var.flowlog_bucket_arn, var.vpc_full_name)
log_destination_type = "s3"
iam_role_arn = var.flowlog_role_arn
traffic_type = "ALL"
vpc_id = var.vpc_id
# iam_role_arn = var.flowlog_role_arn
traffic_type = "ALL"
vpc_id = var.vpc_id

tags = merge(
local.base_tags,
Expand Down

0 comments on commit 21b76d4

Please sign in to comment.