You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,11 @@ We literally have [*hundreds of terraform modules*][terraform_modules] that are
86
86
Instead pin to the release tag (e.g. `?ref=tags/x.y.z`) of one of our [latest releases](https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn/releases).
87
87
88
88
89
+
90
+
For a complete example, see [examples/complete](examples/complete).
91
+
92
+
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest) (which tests and deploys the example on AWS), see [test](test).
Full working example can be found in [examples](./examples) folder.
101
-
102
105
### Generating ACM Certificate
103
106
104
107
Use the AWS cli to [request new ACM certifiates](http://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request.html) (requires email validation)
@@ -156,10 +159,10 @@ Available targets:
156
159
| cors_allowed_methods | List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for S3 bucket | list(string) |`<list>`| no |
157
160
| cors_allowed_origins | List of allowed origins (e.g. example.com, test.com) for S3 bucket | list(string) |`<list>`| no |
158
161
| cors_expose_headers | List of expose header in the response for S3 bucket | list(string) |`<list>`| no |
159
-
| cors_max_age_seconds | Time in seconds that browser can cache the response for S3 bucket |string|`3600`| no |
162
+
| cors_max_age_seconds | Time in seconds that browser can cache the response for S3 bucket |number|`3600`| no |
160
163
| custom_error_response | List of one or more custom error response element maps | object |`<list>`| no |
161
164
| default_root_object | Object that CloudFront return when requests the root URL | string |`index.html`| no |
162
-
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |string|`60`| no |
165
+
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |number|`60`| no |
163
166
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes`| string |`-`| no |
164
167
| 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 |
165
168
| encryption_enabled | When set to 'true' the resource will have aes256 encryption enabled by default | bool |`false`| no |
@@ -172,20 +175,18 @@ Available targets:
172
175
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list(string) |`<list>`| no |
173
176
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist`| string |`none`| no |
174
177
| index_document | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders | string | `` | no |
175
-
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool |`false`| no |
176
-
| is_ipv6_enabled | State of CloudFront IPv6 | bool |`true`| no |
178
+
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool |`true`| no |
177
179
| lambda_function_association | A config block that triggers a lambda function with specific actions | object |`<list>`| no |
178
-
| log_expiration_days | Number of days after which to expunge the objects |string|`90`| no |
179
-
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier |string|`60`| no |
180
+
| log_expiration_days | Number of days after which to expunge the objects |number|`90`| no |
181
+
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier |number|`60`| no |
180
182
| log_include_cookies | Include cookies in access logs | bool |`false`| no |
181
183
| log_prefix | Path of logs in S3 bucket | string | `` | no |
182
-
| log_standard_transition_days | Number of days to persist in the standard storage tier before moving to the glacier tier |string|`30`| no |
183
-
| max_ttl | Maximum amount of time (in seconds) that an object is in a CloudFront cache |string|`31536000`| no |
184
-
| min_ttl | Minimum amount of time that you want objects to stay in CloudFront caches |string|`0`| no |
184
+
| log_standard_transition_days | Number of days to persist in the standard storage tier before moving to the glacier tier |number|`30`| no |
185
+
| max_ttl | Maximum amount of time (in seconds) that an object is in a CloudFront cache |number|`31536000`| no |
186
+
| min_ttl | Minimum amount of time that you want objects to stay in CloudFront caches |number|`0`| no |
185
187
| minimum_protocol_version | Cloudfront TLS minimum protocol version | string |`TLSv1`| no |
186
188
| name | Name (e.g. `bastion` or `app`) | string | - | yes |
187
189
| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no |
188
-
| null | an empty string | string | `` | no |
189
190
| origin_bucket | Origin S3 bucket name | string | `` | no |
190
191
| origin_force_destroy | Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) | bool |`false`| no |
191
192
| origin_path | An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. | string | `` | no |
Copy file name to clipboardExpand all lines: README.yaml
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,11 @@ description: |-
56
56
57
57
# How to use this project
58
58
usage: |-
59
+
60
+
For a complete example, see [examples/complete](examples/complete).
61
+
62
+
For automated tests of the complete example using [bats](https://github.com/bats-core/bats-core) and [Terratest](https://github.com/gruntwork-io/terratest) (which tests and deploys the example on AWS), see [test](test).
Copy file name to clipboardExpand all lines: docs/terraform.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,10 @@
15
15
| cors_allowed_methods | List of allowed methods (e.g. GET, PUT, POST, DELETE, HEAD) for S3 bucket | list(string) |`<list>`| no |
16
16
| cors_allowed_origins | List of allowed origins (e.g. example.com, test.com) for S3 bucket | list(string) |`<list>`| no |
17
17
| cors_expose_headers | List of expose header in the response for S3 bucket | list(string) |`<list>`| no |
18
-
| cors_max_age_seconds | Time in seconds that browser can cache the response for S3 bucket |string|`3600`| no |
18
+
| cors_max_age_seconds | Time in seconds that browser can cache the response for S3 bucket |number|`3600`| no |
19
19
| custom_error_response | List of one or more custom error response element maps | object |`<list>`| no |
20
20
| default_root_object | Object that CloudFront return when requests the root URL | string |`index.html`| no |
21
-
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |string|`60`| no |
21
+
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache |number|`60`| no |
22
22
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes`| string |`-`| no |
23
23
| 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 |
24
24
| encryption_enabled | When set to 'true' the resource will have aes256 encryption enabled by default | bool |`false`| no |
@@ -31,20 +31,18 @@
31
31
| geo_restriction_locations | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | list(string) |`<list>`| no |
32
32
| geo_restriction_type | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist`| string |`none`| no |
33
33
| index_document | Amazon S3 returns this index document when requests are made to the root domain or any of the subfolders | string | `` | no |
34
-
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool |`false`| no |
35
-
| is_ipv6_enabled | State of CloudFront IPv6 | bool |`true`| no |
34
+
| ipv6_enabled | Set to true to enable an AAAA DNS record to be set as well as the A record | bool |`true`| no |
36
35
| lambda_function_association | A config block that triggers a lambda function with specific actions | object |`<list>`| no |
37
-
| log_expiration_days | Number of days after which to expunge the objects |string|`90`| no |
38
-
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier |string|`60`| no |
36
+
| log_expiration_days | Number of days after which to expunge the objects |number|`90`| no |
37
+
| log_glacier_transition_days | Number of days after which to move the data to the glacier storage tier |number|`60`| no |
39
38
| log_include_cookies | Include cookies in access logs | bool |`false`| no |
40
39
| log_prefix | Path of logs in S3 bucket | string | `` | no |
41
-
| log_standard_transition_days | Number of days to persist in the standard storage tier before moving to the glacier tier |string|`30`| no |
42
-
| max_ttl | Maximum amount of time (in seconds) that an object is in a CloudFront cache |string|`31536000`| no |
43
-
| min_ttl | Minimum amount of time that you want objects to stay in CloudFront caches |string|`0`| no |
40
+
| log_standard_transition_days | Number of days to persist in the standard storage tier before moving to the glacier tier |number|`30`| no |
41
+
| max_ttl | Maximum amount of time (in seconds) that an object is in a CloudFront cache |number|`31536000`| no |
42
+
| min_ttl | Minimum amount of time that you want objects to stay in CloudFront caches |number|`0`| no |
44
43
| minimum_protocol_version | Cloudfront TLS minimum protocol version | string |`TLSv1`| no |
45
44
| name | Name (e.g. `bastion` or `app`) | string | - | yes |
46
45
| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no |
47
-
| null | an empty string | string | `` | no |
48
46
| origin_bucket | Origin S3 bucket name | string | `` | no |
49
47
| origin_force_destroy | Delete all objects from the bucket so that the bucket can be destroyed without error (e.g. `true` or `false`) | bool |`false`| no |
50
48
| origin_path | An optional element that causes CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin. It must begin with a /. Do not add a / at the end of the path. | string | `` | no |
0 commit comments