Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Module creates S3 bucket with insufficient permissions/policy #2

@boldandbusted

Description

@boldandbusted

Howdy. Here's my stanza that seem to present the problem:

module "cloudtrail" {
  source  = "azavea/cloudtrail/aws"
  version = "0.1.0"

  project = "company"
  environment = "dev"
  region = "us-west-2"
  create_s3_bucket = true
  s3_bucket_name = "someone-dev-awscloudtraillogs"
  include_global_service_events = true
  is_multi_region_trail = true
  is_organization_trail = false
}

Presents with:

Error: Error applying plan:

1 error(s) occurred:

* module.cloudtrail.aws_cloudtrail.trail: 1 error(s) occurred:                                                            

* aws_cloudtrail.trail: InsufficientS3BucketPolicyException: Incorrect S3 bucket policy is detected for bucket: someone-dev-awscloudtraillogs
        status code: 400, request id: 4cf790f8-da72-4980-a180-67b7570d1c80                                                

Terraform does not automatically rollback in the face of errors.                                                          
Instead, your Terraform state file has been partially updated with                                                        
any resources that successfully completed. Please address the error                                                       
above and apply again to incrementally change your infrastructure.                                                        

Happy to provide more info so you can replicate the problem. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions