Skip to content

Latest commit

 

History

History
63 lines (50 loc) · 5.97 KB

README.md

File metadata and controls

63 lines (50 loc) · 5.97 KB

S3 Bucket

This was adapted from the terraform-aws-modules The License file for this module can be found in this directory

Requirements

Name Version
terraform >= 0.12.26
aws >= 4.9.0

Providers

Name Version
aws >= 4.9.0

Modules

No modules.

Resources

Name Type
aws_s3_bucket.this resource
aws_s3_bucket_public_access_block.this resource

Inputs

Name Description Type Default Required
acl (Optional, defaults to 'private') ACL to apply to the bucket string "private" no
billing_tag_key (Optional) The name of the billing tag string "CostCentre" no
billing_tag_value (Rquired) The value of the billing tag string n/a yes
block_public_acls (Optional, default 'true') Reject requests to create public ACLs. bool true no
block_public_policy (Optional, default 'true') Reject requests to add Bucket policy if the specified bucket policy allows public access. bool true no
bucket_name (Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name. string null no
bucket_prefix (Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket. string null no
critical_tag_key (Optional) The name of the critical tag. string "Critical" no
critical_tag_value (Required: default=false) The value of the critical tag. If set to true, protection SCP rules will be applied to the resource. bool false no
force_destroy (Optional, Default:false ) A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. These objects are not recoverable. bool false no
ignore_public_acls (Optional, default 'true') Ignore public ACLs on this bucket and any objects that it contains. bool true no
kms_key_arn (Optional) KMS key ARN that will be used to encrypt S3 objects. If not specified, default S3 service key is used for encryption. string null no
lifecycle_rule (Optional) List of maps containing configuration of object lifecycle management. any [] no
logging (Optional) Map containing access bucket logging configuration.
target_bucket: name of the bucket to log to.
target_prefix: prefix to use when logging
map(string) {} no
object_lock_configuration (Optional, Forces new resource) Map containing S3 object locking configuration. any {} no
replication_configuration (Optional) Map containing cross-region replication configuration. any {} no
restrict_public_buckets (Optional, default 'true') Only the bucket owner and AWS Services can access this buckets if it has a public policy. bool true no
tags (Optional) A mapping of tags to assign to the bucket. map(string) {} no
versioning (Optional) Map containing versioning configuration. map(string) {} no

Outputs

Name Description
s3_bucket_arn The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.
s3_bucket_domain_name The bucket domain name. Will be of format bucketname.s3.amazonaws.com.
s3_bucket_id The name of the bucket.
s3_bucket_public_access_block_id n/a
s3_bucket_region The AWS region this bucket resides in.
s3_bucket_regional_domain_name The bucket region-specific domain name. The bucket domain name including the region name, please refer here for format. Note: The AWS CloudFront allows specifying S3 region-specific endpoint when creating S3 origin, it will prevent redirect issues from CloudFront to S3 Origin URL.