Skip to content

Commit 3876e44

Browse files
Rob Callahanaknysh
authored andcommitted
Added var and module property for trusted_signers (#36)
* added var and module property for trusted_signers * updated README
1 parent 9b7c4e1 commit 3876e44

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ Available targets:
9595
lint Lint terraform code
9696
9797
```
98-
9998
## Inputs
10099

101100
| Name | Description | Type | Default | Required |
@@ -124,6 +123,7 @@ Available targets:
124123
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list | `<list>` | no |
125124
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | string | `none` | no |
126125
| is_ipv6_enabled | State of CloudFront IPv6 | string | `true` | no |
126+
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
127127
| log_expiration_days | Number of days after which to expunge the objects | string | `90` | no |
128128
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier | string | `60` | no |
129129
| log_include_cookies | Include cookies in access logs | string | `false` | no |
@@ -144,9 +144,9 @@ Available targets:
144144
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | - | yes |
145145
| static_s3_bucket | aws-cli is a bucket owned by amazon that will perminantly exist. It allows for the data source to be called during the destruction process without failing. It doesn't get used for anything else, this is a safe workaround for handling the fact that if a data source like the one `aws_s3_bucket.selected` gets an error, you can't continue the terraform process which also includes the 'destroy' command, where is doesn't even need this data source! Don't change this bucket name, it's a variable so that we can provide this description. And this works around a problem that is an edge case. | string | `aws-cli` | no |
146146
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no |
147+
| trusted_signers | The AWS accounts, if any, that you want to allow to create signed URLs for private content. 'self' is acceptable. | list | `<list>` | no |
147148
| use_regional_s3_endpoint | When set to 'true' the s3 origin_bucket will use the regional endpoint address instead of the global endpoint address | string | `false` | no |
148149
| viewer_protocol_policy | allow-all, redirect-to-https | string | `redirect-to-https` | no |
149-
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
150150
| web_acl_id | ID of the AWS WAF web ACL that is associated with the distribution | string | `` | no |
151151

152152
## Outputs
@@ -243,7 +243,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
243243

244244
## Copyright
245245

246-
Copyright © 2017-2018 [Cloud Posse, LLC](https://cpco.io/copyright)
246+
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
247247

248248

249249

docs/terraform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Inputs
32

43
| Name | Description | Type | Default | Required |
@@ -27,6 +26,7 @@
2726
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list | `<list>` | no |
2827
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | string | `none` | no |
2928
| is_ipv6_enabled | State of CloudFront IPv6 | string | `true` | no |
29+
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
3030
| log_expiration_days | Number of days after which to expunge the objects | string | `90` | no |
3131
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier | string | `60` | no |
3232
| log_include_cookies | Include cookies in access logs | string | `false` | no |
@@ -47,9 +47,9 @@
4747
| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | - | yes |
4848
| static_s3_bucket | aws-cli is a bucket owned by amazon that will perminantly exist. It allows for the data source to be called during the destruction process without failing. It doesn't get used for anything else, this is a safe workaround for handling the fact that if a data source like the one `aws_s3_bucket.selected` gets an error, you can't continue the terraform process which also includes the 'destroy' command, where is doesn't even need this data source! Don't change this bucket name, it's a variable so that we can provide this description. And this works around a problem that is an edge case. | string | `aws-cli` | no |
4949
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map | `<map>` | no |
50+
| trusted_signers | The AWS accounts, if any, that you want to allow to create signed URLs for private content. 'self' is acceptable. | list | `<list>` | no |
5051
| use_regional_s3_endpoint | When set to 'true' the s3 origin_bucket will use the regional endpoint address instead of the global endpoint address | string | `false` | no |
5152
| viewer_protocol_policy | allow-all, redirect-to-https | string | `redirect-to-https` | no |
52-
| lambda_function_association | A config block that triggers a lambda function with specific actions | list | `<list>` | no |
5353
| web_acl_id | ID of the AWS WAF web ACL that is associated with the distribution | string | `` | no |
5454

5555
## Outputs

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ resource "aws_cloudfront_distribution" "default" {
139139
cached_methods = "${var.cached_methods}"
140140
target_origin_id = "${module.distribution_label.id}"
141141
compress = "${var.compress}"
142+
trusted_signers = "${var.trusted_signers}"
142143

143144
forwarded_values {
144145
query_string = "${var.forward_query_string}"

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ variable "max_ttl" {
206206
description = "Maximum amount of time (in seconds) that an object is in a CloudFront cache"
207207
}
208208

209+
variable "trusted_signers" {
210+
type = "list"
211+
default = []
212+
description = "The AWS accounts, if any, that you want to allow to create signed URLs for private content. 'self' is acceptable."
213+
}
214+
209215
variable "geo_restriction_type" {
210216
# e.g. "whitelist"
211217
default = "none"

0 commit comments

Comments
 (0)