Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 881 Bytes

README.md

File metadata and controls

19 lines (12 loc) · 881 Bytes

Terraform S3 Buckets

This script is a starting point for configuring an S3 bucket to use with Rails ActiveStorage.

This will:

  • Create a new IAM user with S3 access permissions
  • Create a new S3 bucket
  • Create an access policy on the bucket with create and edit permissions tied to the created IAM role, and public read permission. The assumption is that all uploaded files should be readable by the public since they will be things like profile images, etc.

Dependencies

  • Terraform
  • A previously set up AWS profile in $HOME/.aws. Learn more here.

Getting Started

First, run terraform plan to get an output of the resources that will be created.

Second, run terraform apply to apply the plan and create the AWS resources.