Terraform module to create a S3 bucket
Manual tests:
# Replace "xxx" with an actual AWS profile, then execute the integration tests.
export AWS_PROFILE=xxx
make terraform/pytest PYTEST_ARGS="-v --nomock"
For automated testing, PYTEST_ARGS is optional and no profile is needed:
make mockstack/up
make terraform/pytest PYTEST_ARGS="-v"
make mockstack/clean
Name | Version |
---|---|
terraform | >= 0.12 |
aws | >= 3.75.0 |
Name | Version |
---|---|
aws | >= 3.75.0 |
Name | Type |
---|---|
aws_canonical_user_id.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
acl | The canned ACL the bucket will use | string |
null |
no |
bucket | The name of the bucket | string |
null |
no |
cors_configuration | Schema object of CORS configurations for the S3 bucket | object({ |
null |
no |
force_destroy | Boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error | bool |
false |
no |
grants | A list of ACL policy grants. Conflicts with acl , which must be set to null |
list(object({ |
[] |
no |
intelligent_tiering_configuration | Intelligent_tiering_configurations for the S3 bucket | object({ |
null |
no |
inventory | Schema object of the S3 bucket inventory configuration | object({ |
null |
no |
lifecycle_rules | n/a | list(object({ |
[] |
no |
logging | Schema object for the S3 bucket logging configuration | object({ |
null |
no |
notifications | A schema object for the S3 bucket notifications configuration | object({ |
{ |
no |
ownership_controls | Schema object for the S3 ownership controls | object({ |
{ |
no |
policy | A schema object with an IAM policy document in JSON format to apply to the bucket | object({ |
null |
no |
public_access_block | A schema object for the S3 bucket public access block policy | object({ |
{ |
no |
replication_configuration | Schema object of the S3 replication configuration | object({ |
null |
no |
request_payment_configuration | Request payment configuration for the S3 bucket | object({ |
null |
no |
server_side_encryption_configuration | Schema object of the server side encryption configuration | object({ |
{ |
no |
tags | The tags applied to the bucket | map(string) |
{} |
no |
versioning | The state of versioning of the bucket | string |
"Enabled" |
no |
Name | Description |
---|---|
bucket | AWS S3 Bucket object |
notification | Object containing the AWS S3 Bucket notification configuration |
public_access_block | Object containing the AWS S3 Bucket public access block configuration |