Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support multiple origin #15

Merged
merged 29 commits into from
Dec 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9a48618
(add): new origin
xshot9011 Nov 24, 2022
070d217
(fix): null resource
xshot9011 Nov 24, 2022
d852a13
(update): default value
xshot9011 Nov 24, 2022
090b449
(update): code format
xshot9011 Nov 28, 2022
78d230f
(fix): output value
xshot9011 Nov 28, 2022
498ea52
(add): var origin_access_identities
xshot9011 Nov 28, 2022
2a2fe2d
(fix): cloudfront output
xshot9011 Nov 28, 2022
e60428f
(update): origin to any type
xshot9011 Nov 28, 2022
3f3928e
(update): outputs var name
xshot9011 Nov 28, 2022
726b339
(add): cloudfront distribution arn as output
xshot9011 Nov 28, 2022
297f678
(update): empty value from custom_header_token
xshot9011 Nov 30, 2022
7efedd8
(update): set defautl value for origin_config
xshot9011 Nov 30, 2022
c412f74
(update): target_origin_id input
xshot9011 Nov 30, 2022
3b3520a
(update): target_origin_id input
xshot9011 Nov 30, 2022
5753295
(update): remove var.s3_origin
xshot9011 Nov 30, 2022
1f603e9
(update): remove unused section
xshot9011 Nov 30, 2022
856f0bb
(update): resource name
xshot9011 Nov 30, 2022
e763062
(fix): EOL
xshot9011 Nov 30, 2022
14e68e6
(add): origin group
xshot9011 Nov 30, 2022
2c3e834
(update): remove secondary origin group
xshot9011 Nov 30, 2022
df4c25d
(add): support name override
xshot9011 Nov 30, 2022
d3de162
(update): reformat code
xshot9011 Nov 30, 2022
83c37d3
(update): code section
xshot9011 Dec 1, 2022
ae1cad1
(update): gitignore
xshot9011 Dec 1, 2022
7f0983d
(push): move pc
xshot9011 Dec 1, 2022
7247c99
(update): cloudfront configuration
xshot9011 Dec 1, 2022
a358795
(update): exmaple
xshot9011 Dec 2, 2022
0324cb6
(update): example
xshot9011 Dec 2, 2022
9ad343e
(update): CHANGELOG
xshot9011 Dec 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ crash.*.log
# to change depending on the environment.
#
*.tfvars
!examples/*/terraform.auto.tfvars

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
args:
- "--args=--only=terraform_deprecated_interpolation"
- "--args=--only=terraform_deprecated_index"
# - "--args=--only=terraform_unused_declarations"
- "--args=--only=terraform_unused_declarations"
- "--args=--only=terraform_comment_syntax"
- "--args=--only=terraform_documented_outputs"
- "--args=--only=terraform_documented_variables"
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

All notable changes to this module will be documented in this file.

## [v1.1.0] - 2022-12-02

### Added

- Add `output.cloudfront_distribution_arn`
- Add variables `var.name_override`, `var.origin`, `var.origin_group` and `var.origin_access_identities`
- Add locals variables `local.empty_prefix`, `local.empty_environment`, `local.empty_name` and `local.raise_empty_name`
- Add attributes `dynamic "origin"` for all origin in `aws_cloudfront_distribution.distribution`

### Changed

- Update outputs
- Rename `output.cf_domain_name` to `output.cloudfront_distribution_domain_name`
- Rename `output.cf_s3_iam_arn` to `cloudfront_origin_access_identities`
- Update local `local.resource_name` to `local.name`
- Update variable description for `var.prefix`, `var.environment` and `var.name`
- Update resource `aws_cloudfront_distribution.distribution` code format
- Update attribute `default_cache_behavior`; `compress`, `min_ttl`, `default_ttl`, `max_ttl` in `aws_cloudfront_distribution.distribution`

### Removed

- Remove files `dns.tf`, `examples/complete/acm.tf`, `examples/complete/s3.tf`, `iam.tf` and `locals.tf`
- Remove variables `var.lambda_function_association`, `var.s3_origin`, `var.origin_read_timeout`, `var.custom_header_token`, `secondary_origin_config` and `var.origin_config`
- Remove resource `aws_cloudfront_origin_access_identity.cloudfront_s3_policy`
- Remove `custom_origin_config`, `dynamic "origin" (s3)`, `dynamic "ordered_cache_behavior" (s3)` attribute in `aws_cloudfront_distribution.distribution`

## [v1.0.7] - 2022-10-25

### Changed
Expand Down
187 changes: 27 additions & 160 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Your can also report the vulnerabilities by emailing to Oozou DevOps team at:
devops@oozou.com
```

We will acknowledge your email within 72 hours on workday, and will send a more details response within 5 days. After the initial email start, we will investigate the security issue snd fix it as soon as possible.
We will acknowledge your email within 72 hours on workday, and will send a more details response within 5 days. After the initial email start, we will investigate the security issue snd fix it as soon as possible.
13 changes: 0 additions & 13 deletions dns.tf

This file was deleted.

36 changes: 24 additions & 12 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,39 @@ No requirements.

## Providers

No providers.
| Name | Version |
|---------------------------------------------------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | 4.44.0 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_acm_virginia"></a> [acm\_virginia](#module\_acm\_virginia) | git::ssh://git@github.com/oozou/terraform-aws-acm.git | v1.0.1 |
| <a name="module_cloudfront_distribution"></a> [cloudfront\_distribution](#module\_cloudfront\_distribution) | ../../ | n/a |
| <a name="module_s3_for_cloudfront_logs"></a> [s3\_for\_cloudfront\_logs](#module\_s3\_for\_cloudfront\_logs) | git@github.com:oozou/terraform-aws-s3.git | v1.0.4 |
| Name | Source | Version |
|--------------------------------------------------------------------------------------------------------------------|-------------------------------|---------|
| <a name="module_cloudfront_distribution"></a> [cloudfront\_distribution](#module\_cloudfront\_distribution) | ../../ | n/a |
| <a name="module_fargate_cluster"></a> [fargate\_cluster](#module\_fargate\_cluster) | oozou/ecs-fargate-cluster/aws | 1.0.6 |
| <a name="module_nginx_service"></a> [nginx\_service](#module\_nginx\_service) | oozou/ecs-fargate-service/aws | v1.1.9 |
| <a name="module_s3_bucket"></a> [s3\_bucket](#module\_s3\_bucket) | oozou/s3/aws | 1.1.3 |
| <a name="module_s3_cloudfront_log_bucket"></a> [s3\_cloudfront\_log\_bucket](#module\_s3\_cloudfront\_log\_bucket) | oozou/s3/aws | 1.1.3 |
| <a name="module_vpc"></a> [vpc](#module\_vpc) | oozou/vpc/aws | 1.2.4 |

## Resources

No resources.
| Name | Type |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| [aws_cloudfront_origin_access_control.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_access_control) | resource |
| [aws_caller_identity.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
| [aws_iam_policy_document.cloudfront_get_public_object_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.cloudfront_log_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.oac_access_kms_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_custom_tags"></a> [custom\_tags](#input\_custom\_tags) | Custom tags which can be passed on to the AWS resources. They should be key value pairs having distinct keys. | `map(string)` | `{}` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | [Required] Name prefix used for resource naming in this component | `string` | n/a | yes |
| <a name="input_prefix"></a> [prefix](#input\_prefix) | [Required] Name prefix used for resource naming in this component | `string` | n/a | yes |
| Name | Description | Type | Default | Required |
|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|------------|---------|:--------:|
| <a name="input_custom_tags"></a> [custom\_tags](#input\_custom\_tags) | Custom tags which can be passed on to the AWS resources. They should be key value pairs having distinct keys | `map(any)` | `{}` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment Variable used as a prefix | `string` | n/a | yes |
| <a name="input_name"></a> [name](#input\_name) | Name of the resource or project | `string` | n/a | yes |
| <a name="input_prefix"></a> [prefix](#input\_prefix) | The prefix name of customer to be displayed in AWS console and resource | `string` | n/a | yes |

## Outputs

Expand Down
8 changes: 0 additions & 8 deletions examples/complete/acm.tf

This file was deleted.

Loading