Skip to content

Commit 34a9f34

Browse files
dmattiaaknysh
authored andcommitted
Allow removing origin from the origin label (#58)
I also went ahead and did the same with "logs" on the log bucket. These changes are backwards compatible.
1 parent a05cffd commit 34a9f34

File tree

5 files changed

+104
-46
lines changed

5 files changed

+104
-46
lines changed

README.md

Lines changed: 87 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,43 @@
1-
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
1+
<!--
2+
3+
4+
5+
6+
7+
8+
9+
10+
11+
12+
13+
14+
15+
16+
** DO NOT EDIT THIS FILE
17+
**
18+
** This file was automatically generated by the `build-harness`.
19+
** 1) Make all changes to `README.yaml`
20+
** 2) Run `make init` (you only need to do this once)
21+
** 3) Run`make readme` to rebuild this file.
22+
**
23+
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
24+
**
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+
-->
241
[![README Header][readme_header_img]][readme_header_link]
342

443
[![Cloud Posse][logo]](https://cpco.io/homepage)
@@ -123,6 +162,8 @@ Available targets:
123162
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache | string | `60` | no |
124163
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
125164
| 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+
| extra_logs_attributes | Additional attributes to put onto the log bucket label | list(string) | `<list>` | no |
166+
| extra_origin_attributes | Additional attributes to put onto the origin label | list(string) | `<list>` | no |
126167
| forward_cookies | Time in seconds that browser can cache the response for S3 bucket | string | `none` | no |
127168
| forward_header_values | A list of whitelisted header values to forward to the origin | list(string) | `<list>` | no |
128169
| forward_query_string | Forward query strings to the origin that is associated with this cache behavior | bool | `false` | no |
@@ -190,42 +231,47 @@ Check out these related projects.
190231

191232
## Help
192233

193-
**Got a question?**
234+
**Got a question?** We got answers.
194235

195236
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn/issues), send us an [email][email] or join our [Slack Community][slack].
196237

197238
[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]
198239

199-
## Commercial Support
200-
201-
Work directly with our team of DevOps experts via email, slack, and video conferencing.
202-
203-
We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.
240+
## DevOps Accelerator for Startups
204241

205-
[![E-Mail](https://img.shields.io/badge/[email protected])][email]
206242

207-
- **Questions.** We'll use a Shared Slack channel between your team and ours.
208-
- **Troubleshooting.** We'll help you triage why things aren't working.
209-
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback.
210-
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
211-
- **Build New Terraform Modules.** We'll [develop original modules][module_development] to provision infrastructure.
212-
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
213-
- **Implementation.** We'll provide hands-on support to implement our reference architectures.
243+
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
214244

245+
[![Learn More](https://img.shields.io/badge/learn%20more-success.svg?style=for-the-badge)][commercial_support]
215246

247+
Work directly with our team of DevOps experts via email, slack, and video conferencing.
216248

217-
## Terraform Module Development
218-
219-
Are you interested in custom Terraform module development? Submit your inquiry using [our form][module_development] today and we'll get back to you ASAP.
249+
We deliver 10x the value for a fraction of the cost of a full-time engineer. Our track record is not even funny. If you want things done right and you need it done FAST, then we're your best bet.
220250

251+
- **Reference Architecture.** You'll get everything you need from the ground up built using 100% infrastructure as code.
252+
- **Release Engineering.** You'll have end-to-end CI/CD with unlimited staging environments.
253+
- **Site Reliability Engineering.** You'll have total visibility into your apps and microservices.
254+
- **Security Baseline.** You'll have built-in governance with accountability and audit logs for all changes.
255+
- **GitOps.** You'll be able to operate your infrastructure via Pull Requests.
256+
- **Training.** You'll receive hands-on training so your team can operate what we build.
257+
- **Questions.** You'll have a direct line of communication between our teams via a Shared Slack channel.
258+
- **Troubleshooting.** You'll get help to triage when things aren't working.
259+
- **Code Reviews.** You'll receive constructive feedback on Pull Requests.
260+
- **Bug Fixes.** We'll rapidly work with you to fix any bugs in our projects.
221261

222262
## Slack Community
223263

224264
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
225265

226266
## Newsletter
227267

228-
Signup for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
268+
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
269+
270+
## Office Hours
271+
272+
[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!
273+
274+
[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]
229275

230276
## Contributing
231277

@@ -250,7 +296,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
250296

251297
## Copyright
252298

253-
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
299+
Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)
254300

255301

256302

@@ -317,33 +363,31 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
317363
[cliveza_homepage]: https://github.com/cliveza
318364
[cliveza_avatar]: https://img.cloudposse.com/150x150/https://github.com/cliveza.png
319365

320-
321-
322366
[![README Footer][readme_footer_img]][readme_footer_link]
323367
[![Beacon][beacon]][website]
324368

325369
[logo]: https://cloudposse.com/logo-300x69.svg
326-
[docs]: https://cpco.io/docs
327-
[website]: https://cpco.io/homepage
328-
[github]: https://cpco.io/github
329-
[jobs]: https://cpco.io/jobs
330-
[hire]: https://cpco.io/hire
331-
[slack]: https://cpco.io/slack
332-
[linkedin]: https://cpco.io/linkedin
333-
[twitter]: https://cpco.io/twitter
334-
[testimonial]: https://cpco.io/leave-testimonial
335-
[newsletter]: https://cpco.io/newsletter
336-
[email]: https://cpco.io/email
337-
[commercial_support]: https://cpco.io/commercial-support
338-
[we_love_open_source]: https://cpco.io/we-love-open-source
339-
[module_development]: https://cpco.io/module-development
340-
[terraform_modules]: https://cpco.io/terraform-modules
341-
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
342-
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
343-
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
344-
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
345-
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
346-
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/terraform-aws-cloudfront-s3-cdn
370+
[docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=docs
371+
[website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=website
372+
[github]: https://cpco.io/github?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=github
373+
[jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=jobs
374+
[hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=hire
375+
[slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=slack
376+
[linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=linkedin
377+
[twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=twitter
378+
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=testimonial
379+
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=office_hours
380+
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=newsletter
381+
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=email
382+
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=commercial_support
383+
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=we_love_open_source
384+
[terraform_modules]: https://cpco.io/terraform-modules?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=terraform_modules
385+
[readme_header_img]: https://cloudposse.com/readme/header/img
386+
[readme_header_link]: https://cloudposse.com/readme/header/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=readme_header_link
387+
[readme_footer_img]: https://cloudposse.com/readme/footer/img
388+
[readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=readme_footer_link
389+
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
390+
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-s3-cdn&utm_content=readme_commercial_support_link
347391
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-cloudfront-s3-cdn&url=https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn
348392
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-cloudfront-s3-cdn&url=https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn
349393
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-cloudfront-s3-cdn

docs/terraform.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
| default_ttl | Default amount of time (in seconds) that an object is in a CloudFront cache | string | `60` | no |
2222
| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no |
2323
| 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+
| extra_logs_attributes | Additional attributes to put onto the log bucket label | list(string) | `<list>` | no |
25+
| extra_origin_attributes | Additional attributes to put onto the origin label | list(string) | `<list>` | no |
2426
| forward_cookies | Time in seconds that browser can cache the response for S3 bucket | string | `none` | no |
2527
| forward_header_values | A list of whitelisted header values to forward to the origin | list(string) | `<list>` | no |
2628
| forward_query_string | Forward query strings to the origin that is associated with this cache behavior | bool | `false` | no |

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module "origin_label" {
44
stage = var.stage
55
name = var.name
66
delimiter = var.delimiter
7-
attributes = compact(concat(var.attributes, ["origin"]))
7+
attributes = compact(concat(var.attributes, var.extra_origin_attributes))
88
tags = var.tags
99
}
1010

@@ -83,7 +83,7 @@ module "logs" {
8383
stage = var.stage
8484
name = var.name
8585
delimiter = var.delimiter
86-
attributes = compact(concat(var.attributes, ["logs"]))
86+
attributes = compact(concat(var.attributes, var.extra_logs_attributes))
8787
tags = var.tags
8888
lifecycle_prefix = var.log_prefix
8989
standard_transition_days = var.log_standard_transition_days

test/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ init: $(BASE)/vendor
4242
.PHONY : test
4343
## Run tests
4444
test: init
45-
cd $(BASE) && go test -v -timeout 30m -run TestExamplesComplete
45+
cd $(BASE) && go test -v -timeout 60m -run TestExamplesComplete
4646

4747
.PHONY : clean
4848
## Clean up files

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ variable "attributes" {
2727
description = "Additional attributes (e.g. `1`)"
2828
}
2929

30+
variable "extra_origin_attributes" {
31+
type = list(string)
32+
default = ["origin"]
33+
description = "Additional attributes to put onto the origin label"
34+
}
35+
36+
variable "extra_logs_attributes" {
37+
type = list(string)
38+
default = ["logs"]
39+
description = "Additional attributes to put onto the log bucket label"
40+
}
41+
3042
variable "tags" {
3143
type = map(string)
3244
default = {}

0 commit comments

Comments
 (0)