Skip to content

Commit

Permalink
Merge pull request #13 from cookielab/cloudfront_add_origin_path
Browse files Browse the repository at this point in the history
feat(cloudfront): origin path add
  • Loading branch information
pavelsidla authored Sep 16, 2024
2 parents d87777e + 9403d4a commit eb2cb0d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ module "static-site" {
| <a name="input_kms_key_policy"></a> [kms\_key\_policy](#input\_kms\_key\_policy) | Additional KSM key policy | `string` | `"{}"` | no |
| <a name="input_logs_bucket"></a> [logs\_bucket](#input\_logs\_bucket) | n/a | `string` | `null` | no |
| <a name="input_logs_bucket_domain_name"></a> [logs\_bucket\_domain\_name](#input\_logs\_bucket\_domain\_name) | n/a | `string` | `null` | no |
| <a name="input_origin_path"></a> [origin\_path](#input\_origin\_path) | Cloudfront origin path | `string` | `""` | no |
| <a name="input_override_status_code_403"></a> [override\_status\_code\_403](#input\_override\_status\_code\_403) | n/a | `number` | `403` | no |
| <a name="input_override_status_code_404"></a> [override\_status\_code\_404](#input\_override\_status\_code\_404) | n/a | `number` | `200` | no |
| <a name="input_proxy_paths"></a> [proxy\_paths](#input\_proxy\_paths) | n/a | <pre>list(object({<br> origin_domain = string<br> path_prefix = string<br> }))</pre> | `[]` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ resource "aws_cloudfront_distribution" "this" {
domain_name = module.s3_bucket.s3_bucket_bucket_regional_domain_name
origin_id = var.s3_bucket_name
origin_access_control_id = aws_cloudfront_origin_access_control.this.id
origin_path = var.origin_path
}

dynamic "origin" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,9 @@ variable "kms_key_policy" {
default = "{}"
description = "Additional KSM key policy"
}

variable "origin_path" {
type = string
default = ""
description = "Cloudfront origin path"
}

0 comments on commit eb2cb0d

Please sign in to comment.