Skip to content

A terraform script to set up an S3 bucket for use with Rails ActiveStorage.

Notifications You must be signed in to change notification settings

dmcbrayer/terraform-s3-activestorage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A terraform script to set up an S3 bucket for use with Rails ActiveStorage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages