resource "aws_flow_log" "CW-flowlogs" {
  iam_role_arn             = "arn:aws:iam::718729873097:role/flowlogsRole"
  log_destination_type     = "cloud-watch-logs"
  log_destination          = "arn:aws:logs:eu-central-1:718729873097:log-group:cloudops-DIGSYS-D3-flow-logs"
  max_aggregation_interval = 600
  tags                     = { "Name" = "cloudops-DIGSYS-D3-flow-logs" }
  traffic_type             = "ALL"
  vpc_id                   = aws_vpc.DIGSYS-D3.id
}

resource "aws_flow_log" "S3-flowlogs" {
  log_destination          = "arn:aws:s3:::sme-digital-systems-dev-digsys-d3-vpc-flow-logs"
  log_destination_type     = "s3"
  max_aggregation_interval = 600
  tags                     = { "Name" = "S3-DIGSYS-D3-flow-logs" }
  traffic_type             = "ALL"
  vpc_id                   = aws_vpc.DIGSYS-D3.id
  destination_options {
    file_format                = "plain-text"
    hive_compatible_partitions = false
    per_hour_partition         = false
  }
}

