Commit 1fe4111
authored
feat: Backport cloudposse/cloudfront-cdn/aws improvements (#340)
* chore: Add missing origin_keepalive_timeout and origin_read_timeout variables
Backported from
cloudposse/terraform-aws-cloudfront-cdn#140
* fix: Configure CORS rules only when there's at least one origin defined
* fix: Define sane defaults for module variables
* fix: Remove redundant lookup() calls
fix: Remove redundant lookup() call
* fix: Simplify origin_access_control_id assignment
The `for_each` inside the `dynamic "s3_origin_config"` block already
checks for `local.origin_access_identity_enabled`, so there's no need to
check it again here.
* fix: Simplify origin_access_control_id assignment
The `local.origin_access_control_enabled` value used to be checked
twice; now it's evaluated only once (the logic remains the same).
* fix: Sync `variables.tf` defaults with the old `lookup()` func ones
* fix: Remove more redundant `lookup()` calls
All variables references by `local.website_config` come with default
values (see `variables.tf`) which make the func call redundant
* feat: Define sane defaults for `ordered_cache` variable
* fix: Remove unused `versioning_enabled` variable
* docs: Re-generate docs
* chore: Add a minimal module instance to the example dir
* fix(lambda@edge): Add support for doc auto-generation with atmos
* docs: Keep original submodule description
* chore: Keep both atmos.yaml files in sync
* docs: Fix README title
* fix: Update misleading comments
* chore: Add missing space
* docs: Regenerate Lambda@Edge README.md
* feat(custom_origins): Enable shield configuration
* fix: Simplify custom_origin_config and origin_shield variables
There's no point in wrapping them in the `optional(<type>, <default>)`
function - each field has a default value assigned, so given object is
always valid
* fix: Update error_caching_min_ttl and response_code types
* fix: Update OAC variable reference
OAC variable is located outside of the `s3_origin_config` block
* docs: Re-generate README.md
* feat: Enable shield configuration for custom S3 origins
* fix: Make origin_shield block optional
* feat: Add gRPC support to custom origins
* chore: Update default origin_ssl_protocols value
* chore: Update default origin_protocol_policy value
* fix: `whitelisted_names` param makes sense only when `forward=whitelist`
Forwarding cookies to an S3 bucket would be pointless, however in some
(rare) cases it may be handy (e.g. Lambda in front of a bucket that
reads the cookies)
* chore: Remove redundant new line
* fix: Reference label vars in the minimal module to enable its deployment
* fix: Run init prior to sanity checks
* fix: Remove no longer available `-get-plugins=true` flag
`-get-plugins` flag was removed in 0.15.0:
https://github.com/hashicorp/terraform/blob/v0.15/CHANGELOG.md
* fix: Pass context to minimal module instance
* fix: Distinguish minimal s3-cdn module instance from the primary one
There are 2 s3-cdn module instances - in `examples/complete/main.tf` and
`examples/complete/minimal.tf` files respectively. To avoid name
collisions, let's add an attribute that differentiates them
* fix: Remove unused `.tfvars` file
* fix: Prefer secure origin communication by default1 parent 879e6ec commit 1fe4111
File tree
7 files changed
+160
-85
lines changed- examples/complete
- test
- src
7 files changed
+160
-85
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
329 | | - | |
330 | 331 | | |
331 | 332 | | |
332 | 333 | | |
| |||
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
353 | | - | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
357 | 358 | | |
358 | | - | |
| 359 | + | |
359 | 360 | | |
360 | 361 | | |
361 | 362 | | |
| |||
524 | 525 | | |
525 | 526 | | |
526 | 527 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
| |||
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
556 | | - | |
557 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
558 | 562 | | |
559 | | - | |
| 563 | + | |
560 | 564 | | |
561 | 565 | | |
562 | 566 | | |
563 | 567 | | |
564 | 568 | | |
| 569 | + | |
565 | 570 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
572 | 585 | | |
573 | 586 | | |
574 | 587 | | |
| |||
578 | 591 | | |
579 | 592 | | |
580 | 593 | | |
581 | | - | |
| 594 | + | |
582 | 595 | | |
583 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
584 | 601 | | |
585 | 602 | | |
586 | 603 | | |
587 | 604 | | |
588 | 605 | | |
589 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
590 | 619 | | |
591 | 620 | | |
592 | 621 | | |
| |||
620 | 649 | | |
621 | 650 | | |
622 | 651 | | |
623 | | - | |
| 652 | + | |
| 653 | + | |
624 | 654 | | |
625 | 655 | | |
626 | 656 | | |
| |||
636 | 666 | | |
637 | 667 | | |
638 | 668 | | |
639 | | - | |
| 669 | + | |
640 | 670 | | |
641 | 671 | | |
642 | 672 | | |
| |||
667 | 697 | | |
668 | 698 | | |
669 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
670 | 707 | | |
671 | 708 | | |
672 | 709 | | |
| |||
676 | 713 | | |
677 | 714 | | |
678 | 715 | | |
679 | | - | |
| 716 | + | |
680 | 717 | | |
681 | 718 | | |
682 | 719 | | |
| |||
691 | 728 | | |
692 | 729 | | |
693 | 730 | | |
694 | | - | |
| 731 | + | |
695 | 732 | | |
696 | 733 | | |
697 | 734 | | |
| |||
716 | 753 | | |
717 | 754 | | |
718 | 755 | | |
719 | | - | |
| 756 | + | |
720 | 757 | | |
721 | | - | |
722 | | - | |
| 758 | + | |
| 759 | + | |
723 | 760 | | |
724 | 761 | | |
725 | 762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
0 commit comments