Skip to content

Commit f7907f3

Browse files
Update bucket logging module version (#82)
Co-authored-by: actions-bot <[email protected]>
1 parent e84f466 commit f7907f3

File tree

4 files changed

+26
-15
lines changed

4 files changed

+26
-15
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Available targets:
183183
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
184184
| enabled | Select Enabled if you want CloudFront to begin processing requests as soon as the distribution is created, or select Disabled if you do not want CloudFront to begin processing requests after the distribution is created. | `bool` | `true` | no |
185185
| encryption\_enabled | When set to 'true' the resource will have aes256 encryption enabled by default | `bool` | `false` | no |
186+
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no |
186187
| error\_document | An absolute path to the document to return in case of a 4XX error | `string` | `""` | no |
187188
| extra\_logs\_attributes | Additional attributes to put onto the log bucket label | `list(string)` | <pre>[<br> "logs"<br>]</pre> | no |
188189
| extra\_origin\_attributes | Additional attributes to put onto the origin label | `list(string)` | <pre>[<br> "origin"<br>]</pre> | no |

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | `string` | `"-"` | no |
4040
| enabled | Select Enabled if you want CloudFront to begin processing requests as soon as the distribution is created, or select Disabled if you do not want CloudFront to begin processing requests after the distribution is created. | `bool` | `true` | no |
4141
| encryption\_enabled | When set to 'true' the resource will have aes256 encryption enabled by default | `bool` | `false` | no |
42+
| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no |
4243
| error\_document | An absolute path to the document to return in case of a 4XX error | `string` | `""` | no |
4344
| extra\_logs\_attributes | Additional attributes to put onto the log bucket label | `list(string)` | <pre>[<br> "logs"<br>]</pre> | no |
4445
| extra\_origin\_attributes | Additional attributes to put onto the origin label | `list(string)` | <pre>[<br> "origin"<br>]</pre> | no |

main.tf

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ locals {
2626
}
2727

2828
module "origin_label" {
29-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
30-
namespace = var.namespace
31-
stage = var.stage
32-
name = var.name
33-
delimiter = var.delimiter
34-
attributes = compact(concat(var.attributes, var.extra_origin_attributes))
35-
tags = var.tags
29+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
30+
namespace = var.namespace
31+
environment = var.environment
32+
stage = var.stage
33+
name = var.name
34+
delimiter = var.delimiter
35+
attributes = compact(concat(var.attributes, var.extra_origin_attributes))
36+
tags = var.tags
3637
}
3738

3839
resource "aws_cloudfront_origin_access_identity" "default" {
@@ -145,9 +146,10 @@ resource "aws_s3_bucket" "origin" {
145146
}
146147

147148
module "logs" {
148-
source = "git::https://github.com/cloudposse/terraform-aws-s3-log-storage.git?ref=tags/0.7.0"
149+
source = "git::https://github.com/cloudposse/terraform-aws-s3-log-storage.git?ref=tags/0.9.0"
149150
enabled = var.logging_enabled
150151
namespace = var.namespace
152+
environment = var.environment
151153
stage = var.stage
152154
name = var.name
153155
delimiter = var.delimiter
@@ -161,13 +163,14 @@ module "logs" {
161163
}
162164

163165
module "distribution_label" {
164-
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
165-
namespace = var.namespace
166-
stage = var.stage
167-
name = var.name
168-
delimiter = var.delimiter
169-
attributes = var.attributes
170-
tags = var.tags
166+
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0"
167+
namespace = var.namespace
168+
environment = var.environment
169+
stage = var.stage
170+
name = var.name
171+
delimiter = var.delimiter
172+
attributes = var.attributes
173+
tags = var.tags
171174
}
172175

173176
data "aws_s3_bucket" "selected" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ variable "namespace" {
44
default = ""
55
}
66

7+
variable "environment" {
8+
type = string
9+
default = ""
10+
description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'"
11+
}
12+
713
variable "stage" {
814
type = string
915
description = "Stage (e.g. `prod`, `dev`, `staging`)"

0 commit comments

Comments
 (0)