Skip to content

lptech-io/terraform-aws-s3-bucket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

Name Version
terraform >= 1.3
aws >= 5.53

Providers

Name Version
aws >= 5.53

Modules

No modules.

Resources

Name Type
aws_s3_bucket.bucket resource
aws_s3_bucket_logging.logging_configuration resource
aws_s3_bucket_ownership_controls.ownership resource
aws_s3_bucket_public_access_block.public_access_block resource
aws_s3_bucket_server_side_encryption_configuration.encryption resource
aws_s3_bucket_versioning.versioning resource

Inputs

Name Description Type Default Required
bucket_name The name of the S3 bucket to be created string n/a yes
kms_key The ARN of the KMS key for bucket's encryption. If not set, the default AWS/S3 key will be used string null no
logging_configuration Logging configuration block
object({
bucket_name = optional(string)
enabled = optional(bool, false)
prefix = optional(string)
})
{
"bucket_name": null,
"enabled": false,
"prefix": null
}
no
object_ownership Set the bucket ownership string "BucketOwnerEnforced" no
public_access_configuration Public access configuration block
object({
block_public_acls = optional(bool, true)
block_public_policy = optional(bool, true)
ignore_public_acls = optional(bool, true)
restrict_public_buckets = optional(bool, true)
})
{
"block_public_acls": true,
"block_public_policy": true,
"ignore_public_acls": true,
"restrict_public_buckets": true
}
no
versioning_status Enable versioning on the bucket string "Disabled" no

Outputs

Name Description
arn The S3 bucket ARN
id The name of S3 bucket
region The AWS region in which the S3 bucket is deployed