Skip to content

Commit

Permalink
do not enable glacier transition by default (#20)
Browse files Browse the repository at this point in the history
* make glacier transition optional
closes #17
relates to cloudposse/terraform-aws-s3-log-storage#23

* do not enable glacier transition by default

* Updated README.md

* Executed 'terraform fmt'

Co-authored-by: Maxim Mironenko <simixido@gmail.com>
Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 24, 2020
1 parent 9911751 commit 6f00226
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ Available targets:
| acl | The canned ACL to apply. We recommend log-delivery-write for compatibility with AWS services | string | `log-delivery-write` | no |
| attributes | Additional attributes (e.g. `1`) | list(string) | `<list>` | no |
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no |
| enable_glacier_transition | Glacier transition might just increase your bill. Set to false to disable lifecycle transitions to AWS Glacier. | bool | `false` | no |
| enabled | Set to `false` to prevent the module from creating any resources | bool | `true` | no |
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
| expiration_days | Number of days after which to expunge the objects | string | `90` | no |
Expand Down
1 change: 1 addition & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
| acl | The canned ACL to apply. We recommend log-delivery-write for compatibility with AWS services | string | `log-delivery-write` | no |
| attributes | Additional attributes (e.g. `1`) | list(string) | `<list>` | no |
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no |
| enable_glacier_transition | Glacier transition might just increase your bill. Set to false to disable lifecycle transitions to AWS Glacier. | bool | `false` | no |
| enabled | Set to `false` to prevent the module from creating any resources | bool | `true` | no |
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no |
| expiration_days | Number of days after which to expunge the objects | string | `90` | no |
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ data "aws_iam_policy_document" "default" {
}

module "s3_bucket" {
source = "git::https://github.com/cloudposse/terraform-aws-s3-log-storage.git?ref=tags/0.7.0"
source = "git::https://github.com/cloudposse/terraform-aws-s3-log-storage.git?ref=tags/0.8.0"
enabled = var.enabled
namespace = var.namespace
stage = var.stage
Expand All @@ -76,6 +76,7 @@ module "s3_bucket" {
noncurrent_version_transition_days = var.noncurrent_version_transition_days
standard_transition_days = var.standard_transition_days
glacier_transition_days = var.glacier_transition_days
enable_glacier_transition = var.enable_glacier_transition
expiration_days = var.expiration_days
sse_algorithm = var.sse_algorithm
kms_master_key_arn = var.kms_master_key_arn
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ variable "glacier_transition_days" {
default = 60
}

variable "enable_glacier_transition" {
type = bool
default = false
description = "Glacier transition might just increase your bill. Set to false to disable lifecycle transitions to AWS Glacier."
}

variable "expiration_days" {
description = "Number of days after which to expunge the objects"
default = 90
Expand Down

0 comments on commit 6f00226

Please sign in to comment.