Giter Club home page Giter Club logo

terraform-aws-s3-bucket-replication's Introduction

terraform-aws-s3-bucket-replication

Description

Terraform module for enabling S3 replication between two buckets.

Will be used for HashiTalks: Africa 2023.

Features:

  • Enable S3 replication between buckets
  • Allow cross-region replication
  • Allow cross-account replication
  • Multiple destinations are supported

AWS documentation


Prerequisites

You will need to create 2 S3 buckets. The examples show possible ways to achieve this.


Usage

See examples dropdown on Terraform Cloud, or browse here.


Testing

This module is tested during development using pytest and tftest. See the tests folder for further details, and in particular the testing readme.


Notes

This repo was created from terraform-aws-template


Known issues

This project is currently unlicenced. Please contact the maintaining team to add a licence.


Contributing

Direct contributions are welcome.

See CONTRIBUTING.md for further information.


Documentation


Inputs

Name Description Type Default Required
aws_iam_role_permissions_boundary AWS IAM Role permissions boundary. string null no
create_iam_resources Whether to create IAM resources. bool true no
name_for_created_iam_resources Name for created IAM resources. string n/a yes
replication_configuration Replication configuration, in priority order. See the comments in variables.tf for usage.
list(object({

destination_bucket_name = string

# S3 bucket prefix to replicate.
prefix = string # coalesced to ""

# Destination S3 bucket KMS Key ARN if applicable.
destination_bucket_kms_key_arn = string

# Destination AWS Account ID. Only use for cross-account replication. When specified, replica object ownership will be set to this account.
destination_aws_account_id = string

# Destination S3 bucket region. If unspecified, then the provider region is used.
destination_bucket_region = string

# Whether delete markers are replicated.
enable_delete_marker_replication = bool # coalesced to true

# Whether to enable S3 Replication Time Control (S3 RTC) and Replication Metrics.
enable_replication_time_control_and_metrics = bool # coalesced to false
})
)
n/a yes
replication_role_arn IAM Role ARN for replication role. string null no
source_bucket_kms_key_arn Source S3 bucket KMS Key ARN string null no
source_bucket_name Source S3 bucket name string n/a yes
source_bucket_region Source S3 bucket region. If unspecified, then the provider region is used. string null no
tags Map of additional tags to assign to created resources. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level. map(string) n/a yes

Modules

No modules.


Outputs

No outputs.


Providers

Name Version
aws ~> 4.9

Requirements

Name Version
terraform >= 0.15.5
aws ~> 4.9

Resources

Name Type
aws_iam_policy.this resource
aws_iam_role.this resource
aws_iam_role_policy_attachment.this resource
aws_s3_bucket_replication_configuration.this resource
aws_iam_policy_document.replication_role_assume_role_policy data source
aws_iam_policy_document.replication_role_policy_document data source
aws_region.current data source

terraform-aws-s3-bucket-replication's People

Contributors

baolsen avatar github-actions[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.