Skip to content

ministryofjustice/modernisation-platform-terraform-s3-bucket-replication-role

Repository files navigation

Modernisation Platform Terraform S3 Bucket Replication Role Module

Standards Icon Format Code Icon Scorecards Icon SCA Icon Terraform SCA Icon

A Terraform module to create an IAM role for S3 bucket replication.

Usage

module "s3-replication-role" {
  source             = "modernisation-platform-terraform-s3-bucket-replication-role"
  buckets            = [module.s3-bucket.bucket.arn]
  replication_bucket = "bucket-name"
  tags               = local.tags
}

Requirements

Name Version
terraform >= 1.0.1
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_iam_policy.default resource
aws_iam_role.default resource
aws_iam_role_policy_attachment.default resource
aws_iam_policy_document.default-policy data source
aws_iam_policy_document.s3-assume-role-policy data source

Inputs

Name Description Type Default Required
buckets A list of bucket ARNs to allow access to list(any) n/a yes
replication_bucket Name of bucket used for replication - if not specified then * will be used in the policy string "" no
suffix_name Suffix for role and policy names string "" no
tags Tags to apply to resources, where applicable map(any) {} no

Outputs

Name Description
policy Direct aws_iam_policy resource with all attributes
role Direct aws_iam_role resource with all attributes

Looking for issues?

If you're looking to raise an issue with this module, please create a new issue in the Modernisation Platform repository.