Hi, I just pulled this repo and ran it on a sandbox account without making any changes to your code. I got a bunch of these errors on both line 14 and line 41:
Error: Not enough list items
│
│ with aws_cloudtrail.s3events,
│ on aws_cloudtrail__s3events.tf line 14, in resource "aws_cloudtrail" "s3events":
│ 14: advanced_event_selector {
│
│ Attribute advanced_event_selector.0.field_selector.0.starts_with requires 1 item minimum, but config has only 0 declared.
Hi, I just pulled this repo and ran it on a sandbox account without making any changes to your code. I got a bunch of these errors on both line 14 and line 41:
Error: Not enough list items │ │ with aws_cloudtrail.s3events, │ on aws_cloudtrail__s3events.tf line 14, in resource "aws_cloudtrail" "s3events": │ 14: advanced_event_selector { │ │ Attribute advanced_event_selector.0.field_selector.0.starts_with requires 1 item minimum, but config has only 0 declared.
File generated by aws2tf see https://github.com/aws-samples/aws2tf
aws_cloudtrail.s3events:
resource "aws_cloudtrail" "s3events" { enable_log_file_validation = true enable_logging = true include_global_service_events = true is_multi_region_trail = true is_organization_trail = false name = "s3events" s3_bucket_name = aws_s3_bucket.b_aws-cloudtrail-logs-"awsaccountnumber"-54acd01e.bucket tags = {} tags_all = {}
advanced_event_selector { field_selector { ends_with = [] equals = [ "AWS::S3::Object", ] field = "resources.type" not_ends_with = [] not_equals = [] not_starts_with = [] starts_with = [] } field_selector { ends_with = [] equals = [ "Data", ] field = "eventCategory" not_ends_with = [] not_equals = [] not_starts_with = [] starts_with = [] } } advanced_event_selector { name = "Management events selector"
} }