Skip to content

Commit

Permalink
feat(cloudfront): allow to set cloudfront restrictions settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jindrichskupa committed Dec 17, 2024
1 parent 1bb5691 commit b3a8c2b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ resource "aws_cloudfront_distribution" "this" {

restrictions {
geo_restriction {
restriction_type = "none"
restriction_type = var.restriction_type
locations = var.restrictions_locations
}
}

Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ variable "tags" {
default = {}
}

variable "restriction_type" {
description = "Apply for geo restrictions, values: none, whitelist, blacklist"
type = string
default = "none"
}

variable "restrictions_locations" {
description = "List of country codes"
type = list(string)
default = null
}

variable "proxy_paths" {
type = list(object({
origin_domain = string
Expand Down

0 comments on commit b3a8c2b

Please sign in to comment.