Module library

S3

Terraform module to create AWS S3 resources

Version
Submodules
account-public-accessnotificationobjecttable-bucketvectors

Inputs

40 / 72
acceleration_statusoptionalstring

(Optional) Sets the accelerate configuration of an existing bucket. Can be Enabled or Suspended.

Defaultnull
access_log_delivery_policy_source_accountsoptionallist(string)

(Optional) List of AWS Account IDs should be allowed to deliver access logs to this bucket.

Default[]
access_log_delivery_policy_source_bucketsoptionallist(string)

(Optional) List of S3 bucket ARNs which should be allowed to deliver access logs to this bucket.

Default[]
access_log_delivery_policy_source_organizationsoptionallist(string)

(Optional) List of AWS Organization IDs should be allowed to deliver access logs to this bucket.

Default[]
acloptionalstring

(Optional) The canned ACL to apply. Conflicts with `grant`

Defaultnull
allowed_kms_key_arnoptionalstring

The ARN of KMS key which should be allowed in PutObject

Defaultnull
analytics_configurationoptionalany

Map containing bucket analytics configuration.

Default{}
analytics_self_source_destinationoptionalbool

Whether or not the analytics source bucket is also the destination bucket.

Defaultfalse
analytics_source_account_idoptionalstring

The analytics source account id.

Defaultnull
analytics_source_bucket_arnoptionalstring

The analytics source bucket ARN.

Defaultnull
attach_access_log_delivery_policyoptionalbool

Controls if S3 bucket should have S3 access log delivery policy attached

Defaultfalse
attach_analytics_destination_policyoptionalbool

Controls if S3 bucket should have bucket analytics destination policy attached.

Defaultfalse
attach_cloudtrail_log_delivery_policyoptionalbool

Controls if S3 bucket should have CloudTrail log delivery policy attached

Defaultfalse
attach_deny_incorrect_encryption_headersoptionalbool

Controls if S3 bucket should deny incorrect encryption headers policy attached.

Defaultfalse
attach_deny_incorrect_kms_key_sseoptionalbool

Controls if S3 bucket policy should deny usage of incorrect KMS key SSE.

Defaultfalse
attach_deny_insecure_transport_policyoptionalbool

Controls if S3 bucket should have deny non-SSL transport policy attached

Defaultfalse
attach_deny_ssec_encrypted_object_uploadsoptionalbool

Controls if S3 bucket should deny SSEC encrypted object uploads.

Defaultfalse
attach_deny_unencrypted_object_uploadsoptionalbool

Controls if S3 bucket should deny unencrypted object uploads policy attached.

Defaultfalse
attach_elb_log_delivery_policyoptionalbool

Controls if S3 bucket should have ELB log delivery policy attached

Defaultfalse
attach_inventory_destination_policyoptionalbool

Controls if S3 bucket should have bucket inventory destination policy attached.

Defaultfalse
attach_lb_log_delivery_policyoptionalbool

Controls if S3 bucket should have ALB/NLB log delivery policy attached

Defaultfalse
attach_policyoptionalbool

Controls if S3 bucket should have bucket policy attached (set to `true` to use value of `policy` as bucket policy)

Defaultfalse
attach_public_policyoptionalbool

Controls if a user defined public bucket policy will be attached (set to `false` to allow upstream to apply defaults to the bucket)

Defaulttrue
attach_require_latest_tls_policyoptionalbool

Controls if S3 bucket should require the latest version of TLS

Defaultfalse
attach_waf_log_delivery_policyoptionalbool

Controls if S3 bucket should have WAF log delivery policy attached

Defaultfalse
availability_zone_idoptionalstring

Availability Zone ID or Local Zone ID

Defaultnull
block_public_aclsoptionalbool

Whether Amazon S3 should block public ACLs for this bucket.

Defaulttrue
block_public_policyoptionalbool

Whether Amazon S3 should block public bucket policies for this bucket.

Defaulttrue
bucketoptionalstring

(Optional, Forces new resource) The name of the bucket. If omitted, Terraform will assign a random, unique name.

Defaultnull
bucket_namespaceoptionalstring

Namespace for the bucket. Determines bucket naming scope. Valid values: account-regional, global. Defaults to global (AWS)

Defaultnull
bucket_prefixoptionalstring

(Optional, Forces new resource) Creates a unique bucket name beginning with the specified prefix. Conflicts with bucket.

Defaultnull
control_object_ownershipoptionalbool

Whether to manage S3 Bucket Ownership Controls on this bucket.

Defaultfalse
cors_ruleoptionalany

List of maps containing rules for Cross-Origin Resource Sharing.

Default[]
create_bucketoptionalbool

Controls if S3 bucket should be created

Defaulttrue
create_metadata_configurationoptionalbool

Whether to create metadata configuration resource

Defaultfalse
data_redundancyoptionalstring

Data redundancy. Valid values: `SingleAvailabilityZone`

Defaultnull
expected_bucket_owneroptionalstring

The account ID of the expected bucket owner

Defaultnull
force_destroyoptionalbool

(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.

Defaultfalse
grantoptionalany

An ACL policy grant. Conflicts with `acl`

Default[]
ignore_public_aclsoptionalbool

Whether Amazon S3 should ignore public ACLs for this bucket.

Defaulttrue

All 72 are optional — the module deploys with none of them set. Showing 40, so the site stays a static download — the remaining 32 are in the source.

Outputs

15
aws_s3_bucket_versioning_status

The versioning status of the bucket. Will be 'Enabled', 'Suspended', or 'Disabled'.

s3_bucket_arn

The ARN of the bucket. Will be of format arn:aws:s3:::bucketname.

s3_bucket_bucket_domain_name

The bucket domain name. Will be of format bucketname.s3.amazonaws.com.

s3_bucket_bucket_namespace

The namespace of the bucket.

s3_bucket_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.

s3_bucket_hosted_zone_id

The Route 53 Hosted Zone ID for this bucket's region.

s3_bucket_id

The name of the bucket.

s3_bucket_lifecycle_configuration_rules

The lifecycle rules of the bucket, if the bucket is configured with lifecycle rules. If not, this will be an empty string.

s3_bucket_policy

The policy of the bucket, if the bucket is configured with a policy. If not, this will be an empty string.

s3_bucket_region

The AWS region this bucket resides in.

s3_bucket_tags

Tags of the bucket.

s3_bucket_website_domain

The domain of the website endpoint, if the bucket is configured with a website. If not, this will be an empty string. This is used to create Route 53 alias records.

s3_bucket_website_endpoint

The website endpoint, if the bucket is configured with a website. If not, this will be an empty string.

s3_directory_bucket_arn

ARN of the directory bucket.

s3_directory_bucket_name

Name of the directory bucket.

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.