Skip to content

Commit

Permalink
Added new variable custom_origin_config
Browse files Browse the repository at this point in the history
  • Loading branch information
hmarsolla committed Jul 26, 2024
1 parent a4c53a5 commit 1d0097d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ module "aws_cloudfront" {
origin = {
domain_name = # DNS domain name of either the S3 bucket, or web site of your custom origin
origin_id = # Unique identifier for the origin
}
custom_origin_config { # Required when using S3 Bucket Websites
http_port = # HTTP Port for custom origin
https_port = # HTTPS Port for custom origin
origin_protocol_policy = # Protocol policy to use such as "http-only"
origin_ssl_protocols = # SSL protocols to use such as ["TLSv1", "TLSv1.1", "TLSv1.2"]
}
restrictions = {
Expand Down
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ resource "aws_cloudfront_distribution" "cloudfront" {
domain_name = var.origin["domain_name"]
origin_id = var.origin["origin_id"]
}

custom_origin_config {
http_port = var.custom_origin_config["http_port"]
https_port = var.custom_origin_config["https_port"]
origin_protocol_policy = var.custom_origin_config["origin_protocol_policy"]
origin_ssl_protocols = var.custom_origin_config["origin_ssl_protocols"]
}

restrictions {
geo_restriction {
Expand Down
4 changes: 4 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ variable "custom_error_response" {
description = ""
}

variable "custom_origin_config" {
description = ""
}

variable "zone_domain_name" {
description = ""
}
Expand Down

0 comments on commit 1d0097d

Please sign in to comment.