Skip to content

ptnglobalcorp/terraform-aws-s3

Repository files navigation

AWS S3 bucket Terraform module Latest Release

This project is part the boilderplate project for all of my terraform modules, which are all licensed under the APACHE2.

Introduction

These features of S3 bucket configurations are supported:

  • server-side encryption
  • object locking

Private bucket with versioning enabled

module "s3_bucket" {
  source = "ptnglobalcorp/s3/aws"
    
  region = "us-east-1"
  region_code = "ue1"
  project = "example project"
  environment = "dev"

  create_private_bucket = true
  force_destroy = true  
  
  tags = local.tags
}

Public bucket with versioning enabled

module "s3_bucket" {
  source = "ptnglobalcorp/s3/aws"
    
  region = "us-east-1
  region_code = "ue1"
  project = "example project"
  environment = "dev"

  create_private_bucket = false
  force_destroy = true  
  
  tags = local.tags
}

Authors

Module is maintained by Toan Trinh with help from these awesome contributors.

Requirements

Name Version
terraform >= 1.0
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

No modules.

Resources

Name Type
aws_kms_key.s3_bucket_encrypt_key resource
aws_s3_bucket.private resource
aws_s3_bucket.public resource
aws_s3_bucket_policy.public_read_access resource
aws_s3_bucket_public_access_block.block resource
aws_s3_bucket_server_side_encryption_configuration.private resource
aws_s3_bucket_server_side_encryption_configuration.public resource

Inputs

Name Description Type Default Required
create_private_bucket Create private bucket bool false no
environment Environment for the infrastructure string n/a yes
force_destroy True or False bool false no
prefix Prefix for name of resource string n/a yes
project Name of project string n/a yes
region Region name string n/a yes
region_code Region code for development string n/a yes
tags (Optional) A mapping of tags to assign to the bucket. map(string) {} no

Outputs

Name Description
s3_bucket_private_arn The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.
s3_bucket_public_arn The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •