Skip to content

Commit

Permalink
Fix examples and set listeners_whitelist optional
Browse files Browse the repository at this point in the history
  • Loading branch information
vlandemaine-orange committed Jan 28, 2020
1 parent 7cf8a0e commit dbf3010
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ inputs = {
| l7policies | List of L7 policies redirected to pools/listeners | <pre>list(object({<br> name = string<br> action = string # REDIRECT_TO_POOL / REDIRECT_TO_LISTENER<br> description = string<br> position = number<br> listener_index = number<br> redirect_listener_index = number # if REDIRECT_TO_LISTENER is set, or null LISTENER must be listen on HTTPS_TERMINATED<br> redirect_pool_index = number # if REDIRECT_TO_POOL is set, or null - pool used to redirect must be not associated with a listener<br> }))<br></pre> | `[]` | no |
| l7policies\_rules | List of L7 policies redirected to pools/listeners | <pre>list(object({<br> l7policy_index = number<br> type = string<br> compare_type = string<br> value = string<br> }))<br></pre> | `[]` | no |
| listeners | Listeners list | <pre>list(object({<br> name = string<br> port = number<br> protocol = string #Protocol used TCP, UDP, HTTP or TERMINATED_HTTPS<br> hasCert = bool<br> }))<br></pre> | n/a | yes |
| listeners\_whitelist | Listeners whitelist | <pre>list(object({<br> listeners_index = number<br> enable_whitelist = bool<br> whitelist = string #Comma separated : "192.168.11.1,192.168.0.1/24,192.168.201.18/8"<br> }))<br></pre> | n/a | yes |
| listeners\_whitelist | Listeners whitelist | <pre>list(object({<br> listeners_index = number<br> enable_whitelist = bool<br> whitelist = string #Comma separated : "192.168.11.1,192.168.0.1/24,192.168.201.18/8"<br> }))<br></pre> | `[]` | no |
| loadbalancer\_name | Name of the Load Balancer (It is already prefixed by elb-\*) | `string` | n/a | yes |
| monitors | List of monitors | <pre>list(object({<br> name = string<br> pool_index = number<br> protocol = string<br> delay = number<br> timeout = number<br> max_retries = number<br> }))<br></pre> | `[]` | no |
| monitorsHttp | List of monitors HTTP/HTTPS | <pre>list(object({<br> name = string<br> pool_index = number<br> protocol = string<br> delay = number<br> timeout = number<br> max_retries = number<br> url_path = string<br> http_method = string<br> expected_codes = string<br> }))<br></pre> | `[]` | no |
Expand Down
32 changes: 1 addition & 31 deletions examples/http_02/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ module "elb_web" {
}
]

pools = [{
name = "poolhttp"
protocol = "HTTP"
lb_method = "ROUND_ROBIN"
listener_index = 0
},
pools = [
{
name = "poolhttps"
protocol = "HTTP"
Expand All @@ -63,20 +58,6 @@ module "elb_web" {
address_index = 1
pool_index = 0
subnet_id = "backend1-subnet-id"
},
{
name = "backend3"
port = 443
address_index = 0
pool_index = 1
subnet_id = "backend1-subnet-id"
},
{
name = "backend4"
port = 443
address_index = 1
pool_index = 1
subnet_id = "backend1-subnet-id"
}
]

Expand All @@ -93,17 +74,6 @@ module "elb_web" {
url_path = "/check"
http_method = "GET"
expected_codes = "2xx,3xx,4xx"
},
{
name = "monitor2"
pool_index = 1
protocol = "HTTP"
delay = 20
timeout = 10
max_retries = 3
url_path = "/check"
http_method = "GET"
expected_codes = "2xx,3xx,4xx"
}
]

Expand Down
4 changes: 2 additions & 2 deletions examples/http_03/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ module "elb_web" {
l7policies = [
{
name = "redirect_to_https"
action = "REDIRECT_TO_LISTENER"
description = "l7 policy to redirect http to https"
action = "REDIRECT_TO_POOL"
description = "l7 policy to request to another pool"
position = 1
listener_index = 0
redirect_pool_index = 1
Expand Down
1 change: 1 addition & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ variable "listeners_whitelist" {
enable_whitelist = bool
whitelist = string #Comma separated : "192.168.11.1,192.168.0.1/24,192.168.201.18/8"
}))
default = []
}

variable "pools" {
Expand Down

0 comments on commit dbf3010

Please sign in to comment.