Skip to content

Commit

Permalink
Merge pull request #28 from rackspace-infrastructure-automation/featu…
Browse files Browse the repository at this point in the history
…re/fix-deprecations

Fix deprecations, new features, and update tests
  • Loading branch information
stevengorrell authored Dec 1, 2022
2 parents 77b3b57 + 5eb3252 commit f32d480
Show file tree
Hide file tree
Showing 8 changed files with 724 additions and 470 deletions.
53 changes: 25 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,22 @@ It will not do s3 origin, which is in another module.
## Basic Usage

```HCL
module "s3" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-s3//?ref=v0.12.3"
bucket_acl = "private"
bucket_logging = false
environment = "Development"
lifecycle_enabled = true
name = "${random_string.s3_rstring.result}-example-s3-bucket"
noncurrent_version_expiration_days = "425"
noncurrent_version_transition_glacier_days = "60"
noncurrent_version_transition_ia_days = "30"
object_expiration_days = "425"
transition_to_glacier_days = "60"
transition_to_ia_days = "30"
versioning = true
website = true
website_error = "error.html"
website_index = "index.html"
module "s3_basic" {
source = "[email protected]:rackspace-infrastructure-automation/aws-terraform-s3//?ref=v0.12.11"
bucket_logging = false
bucket_acl = "private"
environment = "Development"
name = "${random_string.s3_rstring.result}-example-s3-bucket"
versioning = true
lifecycle_enabled = true
lifecycle_rule = [
{
id = "Default MPU Cleanup Rule."
enabled = true
abort_incomplete_multipart_upload_days = 7
}
]
tags = {
RightSaid = "Fred"
Expand Down Expand Up @@ -68,19 +66,22 @@ No Modules.

| Name |
|------|
| [aws_canonical_user_id](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/data-sources/canonical_user_id) |
| [aws_s3_bucket](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket) |
| [aws_s3_bucket_acl](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_acl) |
| [aws_s3_bucket_cors_configuration](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_cors_configuration) |
| [aws_s3_bucket_lifecycle_configuration](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_lifecycle_configuration) |
| [aws_s3_bucket_logging](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_logging) |
| [aws_s3_bucket_object_lock_configuration](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_object_lock_configuration) |
| [aws_s3_bucket_public_access_block](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_public_access_block) |
| [aws_s3_bucket_server_side_encryption_configuration](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_server_side_encryption_configuration) |
| [aws_s3_bucket_versioning](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_versioning) |
| [aws_s3_bucket_website_configuration](https://registry.terraform.io/providers/hashicorp/aws/3.0/docs/resources/s3_bucket_website_configuration) |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| abort\_incomplete\_multipart\_upload\_days | Abort Incomplete Multipart Upload Days i.e. 7 \| 0 | `number` | `7` | no |
| block\_public\_access | Block various forms of public access on a per bucket level | `bool` | `false` | no |
| block\_public\_access\_acl | Related to block\_public\_access. PUT Bucket acl and PUT Object acl calls will fail if the specified ACL allows public access. PUT Object calls will fail if the request includes an object ACL. | `bool` | `true` | no |
| block\_public\_access\_ignore\_acl | Related to block\_public\_access. Ignore public ACLs on this bucket and any objects that it contains. | `bool` | `true` | no |
Expand All @@ -94,30 +95,26 @@ No Modules.
| environment | Application environment for which this network is being created. must be one of ['Development', 'Integration', 'PreProduction', 'Production', 'QA', 'Staging', 'Test'] | `string` | `"Development"` | no |
| expected\_bucket\_owner | The account ID of the expected bucket owner | `string` | `null` | no |
| force\_destroy\_bucket | 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 |
| intelligent\_tiering | Map containing intelligent tiering configuration. | `any` | `{}` | no |
| kms\_key\_id | The AWS KMS master key ID used for the SSE-KMS encryption. This can only be used when you set the value of sse\_algorithm as aws:kms. | `string` | `""` | no |
| lifecycle\_enabled | Enable object lifecycle management. i.e. true \| false | `bool` | `false` | no |
| lifecycle\_rule\_prefix | Object keyname prefix identifying one or more objects to which the rule applies. Set as an empty string to target the whole bucket. | `string` | `""` | no |
| lifecycle\_rule | List of maps containing configuration of object lifecycle management. | `any` | `[]` | no |
| logging\_bucket\_name | Name of the existing bucket where the logs will be stored. | `string` | `""` | no |
| logging\_bucket\_prefix | Prefix for all log object keys. i.e. logs/ | `string` | `""` | no |
| metric\_configuration | Map containing bucket metric configuration. | `any` | `[]` | no |
| mfa\_delete | Specifies whether MFA delete is enabled in the bucket versioning configuration | `bool` | `false` | no |
| name | The name of the S3 bucket for the access logs. The bucket name can contain only lowercase letters, numbers, periods (.), and dashes (-). Must be globally unique. If changed, forces a new resource. | `string` | n/a | yes |
| noncurrent\_version\_expiration\_days | Indicates after how many days we are deleting previous version of objects. Set to 0 to disable or at least 365 days longer than noncurrent\_version\_transition\_glacier\_days. i.e. 0 to disable, 1-999 otherwise | `number` | `0` | no |
| noncurrent\_version\_transition\_glacier\_days | Indicates after how many days we are moving previous versions to Glacier. Should be 0 to disable or at least 30 days longer than noncurrent\_version\_transition\_ia\_days. i.e. 0 to disable, 1-999 otherwise | `number` | `0` | no |
| noncurrent\_version\_transition\_ia\_days | Indicates after how many days we are moving previous version objects to Standard-IA storage. Set to 0 to disable. | `number` | `0` | no |
| object\_expiration\_days | Indicates after how many days we are deleting current version of objects. Set to 0 to disable or at least 365 days longer than TransitionInDaysGlacier. i.e. 0 to disable, otherwise 1-999 | `number` | `0` | no |
| object\_lock\_enabled | Indicates whether this bucket has an Object Lock configuration enabled. Disabled by default. You can only enable S3 Object Lock for new buckets. If you need to turn on S3 Object Lock for an existing bucket, please contact AWS Support. | `bool` | `false` | no |
| object\_lock\_mode | The default Object Lock retention mode you want to apply to new objects placed in this bucket. Valid values are GOVERNANCE and COMPLIANCE. Default is GOVERNANCE (allows administrative override). | `string` | `"GOVERNANCE"` | no |
| object\_lock\_retention\_days | The retention of the object lock in days. Either days or years must be specified, but not both. | `number` | `null` | no |
| object\_lock\_retention\_years | The retention of the object lock in years. Either days or years must be specified, but not both. | `number` | `null` | no |
| rax\_mpu\_cleanup\_enabled | Enable Rackspace default values for cleanup of Multipart Uploads. | `bool` | `true` | no |
| object\_lock\_token | A token to allow Object Lock to be enabled for an existing bucket. You must contact AWS support for the bucket's 'Object Lock token'. The token is generated in the back-end when versioning is enabled on a bucket. | `string` | `null` | no |
| sse\_algorithm | The server-side encryption algorithm to use. Valid values are AES256, aws:kms, and none | `string` | `"AES256"` | no |
| tags | A map of tags to be applied to the Bucket. i.e {Environment='Development'} | `map(string)` | `{}` | no |
| transition\_to\_glacier\_days | Indicates after how many days we are moving current versions to Glacier. Should be 0 to disable or at least 30 days longer than transition\_to\_ia\_days. i.e. 0 to disable, otherwise 1-999 | `number` | `0` | no |
| transition\_to\_ia\_days | Indicates after how many days we are moving current objects to Standard-IA storage. i.e. 0 to disable, otherwise 1-999 | `number` | `0` | no |
| versioning | Enable bucket versioning. | `bool` | `false` | no |
| website | Use bucket as a static website. i.e. true \| false | `bool` | `false` | no |
| website\_error | Location of Error HTML file. i.e. error.html | `string` | `"error.html"` | no |
| website\_index | Location of Index HTML file. i.e index.html | `string` | `"index.html"` | no |
| website\_config | Map containing static web-site hosting or redirect configuration. | `any` | `{}` | no |

## Outputs

Expand Down
Loading

0 comments on commit f32d480

Please sign in to comment.