-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from clouddrove/CD-190
add new variable
- Loading branch information
Showing
3 changed files
with
50 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
Terraform AWS S3 | ||
</h1> | ||
|
||
<p align="center" style="font-size: 1.2rem;"> | ||
<p align="center" style="font-size: 1.2rem;"> | ||
Terraform module to create default S3 bucket with logging and encryption type specific features. | ||
</p> | ||
|
||
|
@@ -38,7 +38,7 @@ | |
<hr> | ||
|
||
|
||
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure. | ||
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure. | ||
|
||
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself. | ||
|
||
|
@@ -49,9 +49,9 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c | |
|
||
## Prerequisites | ||
|
||
This module has a few dependencies: | ||
This module has a few dependencies: | ||
|
||
- [Terraform 0.12](https://learn.hashicorp.com/terraform/getting-started/install.html) | ||
- [Terraform 0.13](https://learn.hashicorp.com/terraform/getting-started/install.html) | ||
- [Go](https://golang.org/doc/install) | ||
- [github.com/stretchr/testify/assert](https://github.com/stretchr/testify) | ||
- [github.com/gruntwork-io/terratest/modules/terraform](https://github.com/gruntwork-io/terratest) | ||
|
@@ -169,42 +169,42 @@ data "aws_iam_policy_document" "default" { | |
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|:----:|:-----:|:-----:| | ||
| acl | Canned ACL to apply to the S3 bucket. | string | `""` | no | | ||
| application | Application \(e.g. `cd` or `clouddrove`\). | string | `""` | no | | ||
| attributes | Additional attributes \(e.g. `1`\). | list | `<list>` | no | | ||
| aws\_iam\_policy\_document | Specifies the number of days after object creation when the object expires. | string | `""` | no | | ||
| bucket\_enabled | Enable simple S3. | bool | `"false"` | no | | ||
| bucket\_encryption\_enabled | Enable encryption of S3. | bool | `"false"` | no | | ||
| bucket\_logging\_enabled | Enable logging of S3. | bool | `"false"` | no | | ||
| bucket\_logging\_encryption\_enabled | Enable logging encryption of S3. | bool | `"false"` | no | | ||
| bucket\_policy | Conditionally create S3 bucket policy. | bool | `"false"` | no | | ||
| create\_bucket | Conditionally create S3 bucket. | bool | `"true"` | no | | ||
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string | `"-"` | no | | ||
| environment | Environment \(e.g. `prod`, `dev`, `staging`\). | string | `""` | no | | ||
| force\_destroy | 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 | | ||
| kms\_master\_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. The default aws/s3 AWS KMS master key is used if this element is absent while the sse\_algorithm is aws:kms. | string | `""` | no | | ||
| label\_order | Label order, e.g. `name`,`application`. | list | `<list>` | no | | ||
| lifecycle\_days\_to\_expiration | Specifies the number of days after object creation when the object expires. | number | `"365"` | no | | ||
| lifecycle\_days\_to\_glacier\_transition | Specifies the number of days after object creation when it will be moved to Glacier storage. | number | `"180"` | no | | ||
| lifecycle\_days\_to\_infrequent\_storage\_transition | Specifies the number of days after object creation when it will be moved to standard infrequent access storage. | number | `"60"` | no | | ||
| lifecycle\_expiration\_enabled | Specifies expiration lifecycle rule status. | bool | `"false"` | no | | ||
| lifecycle\_expiration\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | string | `""` | no | | ||
| lifecycle\_glacier\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | string | `""` | no | | ||
| lifecycle\_glacier\_transition\_enabled | Specifies Glacier transition lifecycle rule status. | bool | `"false"` | no | | ||
| lifecycle\_infrequent\_storage\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | string | `""` | no | | ||
| lifecycle\_infrequent\_storage\_transition\_enabled | Specifies infrequent storage transition lifecycle rule status. | bool | `"false"` | no | | ||
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | string | `"[email protected]"` | no | | ||
| name | Name \(e.g. `app` or `cluster`\). | string | `""` | no | | ||
| region | Region Where you want to host S3. | string | `""` | no | | ||
| sse\_algorithm | The server-side encryption algorithm to use. Valid values are AES256 and aws:kms. | string | `"AES256"` | no | | ||
| tags | Additional tags \(e.g. map\(`BusinessUnit`,`XYZ`\). | map | `<map>` | no | | ||
| target\_bucket | The name of the bucket that will receive the log objects. | string | `""` | no | | ||
| target\_prefix | To specify a key prefix for log objects. | string | `""` | no | | ||
| versioning | Enable Versioning of S3. | bool | `"false"` | no | | ||
| website\_error | An absolute path to the document to return in case of a 4XX error. | string | `"error.html"` | no | | ||
| website\_hosting\_bucket | Enable website hosting of S3. | bool | `"false"` | no | | ||
| website\_index | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders. | string | `"index.html"` | no | | ||
|------|-------------|------|---------|:--------:| | ||
| acl | Canned ACL to apply to the S3 bucket. | `string` | `""` | no | | ||
| application | Application (e.g. `cd` or `clouddrove`). | `string` | `""` | no | | ||
| attributes | Additional attributes (e.g. `1`). | `list` | `[]` | no | | ||
| aws\_iam\_policy\_document | Specifies the number of days after object creation when the object expires. | `string` | `""` | no | | ||
| bucket\_enabled | Enable simple S3. | `bool` | `false` | no | | ||
| bucket\_encryption\_enabled | Enable encryption of S3. | `bool` | `false` | no | | ||
| bucket\_logging\_enabled | Enable logging of S3. | `bool` | `false` | no | | ||
| bucket\_logging\_encryption\_enabled | Enable logging encryption of S3. | `bool` | `false` | no | | ||
| bucket\_policy | Conditionally create S3 bucket policy. | `bool` | `false` | no | | ||
| create\_bucket | Conditionally create S3 bucket. | `bool` | `true` | no | | ||
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | `string` | `"-"` | no | | ||
| environment | Environment (e.g. `prod`, `dev`, `staging`). | `string` | `""` | no | | ||
| force\_destroy | 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 | | ||
| kms\_master\_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. The default aws/s3 AWS KMS master key is used if this element is absent while the sse\_algorithm is aws:kms. | `string` | `""` | no | | ||
| label\_order | Label order, e.g. `name`,`application`. | `list` | `[]` | no | | ||
| lifecycle\_days\_to\_expiration | Specifies the number of days after object creation when the object expires. | `number` | `365` | no | | ||
| lifecycle\_days\_to\_glacier\_transition | Specifies the number of days after object creation when it will be moved to Glacier storage. | `number` | `180` | no | | ||
| lifecycle\_days\_to\_infrequent\_storage\_transition | Specifies the number of days after object creation when it will be moved to standard infrequent access storage. | `number` | `60` | no | | ||
| lifecycle\_expiration\_enabled | Specifies expiration lifecycle rule status. | `bool` | `false` | no | | ||
| lifecycle\_expiration\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | `string` | `""` | no | | ||
| lifecycle\_glacier\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | `string` | `""` | no | | ||
| lifecycle\_glacier\_transition\_enabled | Specifies Glacier transition lifecycle rule status. | `bool` | `false` | no | | ||
| lifecycle\_infrequent\_storage\_object\_prefix | Object key prefix identifying one or more objects to which the lifecycle rule applies. | `string` | `""` | no | | ||
| lifecycle\_infrequent\_storage\_transition\_enabled | Specifies infrequent storage transition lifecycle rule status. | `bool` | `false` | no | | ||
| managedby | ManagedBy, eg 'CloudDrove' or 'AnmolNagpal'. | `string` | `"[email protected]"` | no | | ||
| mfa\_delete | Enable MFA delete for either Change the versioning state of your bucket or Permanently delete an object version. | `bool` | `false` | no | | ||
| name | Name (e.g. `app` or `cluster`). | `string` | `""` | no | | ||
| sse\_algorithm | The server-side encryption algorithm to use. Valid values are AES256 and aws:kms. | `string` | `"AES256"` | no | | ||
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | `map` | `{}` | no | | ||
| target\_bucket | The name of the bucket that will receive the log objects. | `string` | `""` | no | | ||
| target\_prefix | To specify a key prefix for log objects. | `string` | `""` | no | | ||
| versioning | Enable Versioning of S3. | `bool` | `false` | no | | ||
| website\_error | An absolute path to the document to return in case of a 4XX error. | `string` | `"error.html"` | no | | ||
| website\_hosting\_bucket | Enable website hosting of S3. | `bool` | `false` | no | | ||
| website\_index | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders. | `string` | `"index.html"` | no | | ||
|
||
## Outputs | ||
|
||
|
@@ -219,7 +219,7 @@ data "aws_iam_policy_document" "default" { | |
|
||
|
||
## Testing | ||
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system. | ||
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system. | ||
|
||
You need to run the following command in the testing folder: | ||
```hcl | ||
|
@@ -228,7 +228,7 @@ You need to run the following command in the testing folder: | |
|
||
|
||
|
||
## Feedback | ||
## Feedback | ||
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-s3/issues), or feel free to drop us an email at [[email protected]](mailto:[email protected]). | ||
|
||
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-s3)! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters