From e355c395c907352b1c5c7d7926935e602e0a8437 Mon Sep 17 00:00:00 2001 From: Valentin LANDEMAINE Date: Mon, 27 Jan 2020 18:11:47 +0100 Subject: [PATCH] Terraform fmt on examples --- examples/http_01/main.tf | 172 ++++++++++++------------ examples/http_01/parameters.tfvars | 4 +- examples/http_01/provider.tf | 4 +- examples/http_02/main.tf | 208 ++++++++++++++--------------- examples/http_02/parameters.tfvars | 4 +- examples/http_02/provider.tf | 4 +- examples/http_03/main.tf | 198 +++++++++++++-------------- examples/http_03/parameters.tfvars | 4 +- examples/http_03/provider.tf | 4 +- examples/tcp/main.tf | 84 ++++++------ examples/tcp/parameters.tfvars | 4 +- examples/tcp/provider.tf | 4 +- 12 files changed, 347 insertions(+), 347 deletions(-) diff --git a/examples/http_01/main.tf b/examples/http_01/main.tf index 3798b19..ef7e8d2 100644 --- a/examples/http_01/main.tf +++ b/examples/http_01/main.tf @@ -1,5 +1,5 @@ module "elb_web" { - source = "terraform-flexibleengine-modules/elb/flexibleengine" + source = "terraform-flexibleengine-modules/elb/flexibleengine" version = "1.0.0" loadbalancer_name = "my-http-elb" @@ -19,97 +19,97 @@ module "elb_web" { vip_address = "192.168.13.148" listeners = [ - { - name = "http" - port = 80 - protocol = "HTTP" - hasCert = false - }, - { - name = "https" - port = 443 - protocol = "TERMINATED_HTTPS" - hasCert = true - } - ] - - pools = [ { - name = "poolhttp" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = 0 - }, - { - name = "poolhttps" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = 1 - } - ] + { + name = "http" + port = 80 + protocol = "HTTP" + hasCert = false + }, + { + name = "https" + port = 443 + protocol = "TERMINATED_HTTPS" + hasCert = true + } + ] + + pools = [{ + name = "poolhttp" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = 0 + }, + { + name = "poolhttps" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = 1 + } + ] backends = [ - { - name = "backend1" - port = 80 - address_index = 0 - pool_index = 0 - subnet_id = "backend1-subnet-id" - }, - { - name = "backend2" - port = 80 - 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" - } - ] - - backends_addresses = ["192.168.13.102","192.168.13.247"] - - monitorsHttp = [ - { - name = "monitor1" - pool_index = 0 - protocol = "HTTP" - delay = 20 - timeout = 10 - max_retries = 3 - 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" - } - ] + { + name = "backend1" + port = 80 + address_index = 0 + pool_index = 0 + subnet_id = "backend1-subnet-id" + }, + { + name = "backend2" + port = 80 + 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" + } + ] + + backends_addresses = ["192.168.13.102", "192.168.13.247"] + + monitorsHttp = [ + { + name = "monitor1" + pool_index = 0 + protocol = "HTTP" + delay = 20 + timeout = 10 + max_retries = 3 + 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" + } + ] listeners_whitelist = [ { enable_whitelist = true - whitelist = "192.168.11.1,192.168.0.1/24,192.168.201.18/8" - listeners_index = 0 + whitelist = "192.168.11.1,192.168.0.1/24,192.168.201.18/8" + listeners_index = 0 } ] diff --git a/examples/http_01/parameters.tfvars b/examples/http_01/parameters.tfvars index 28dfebc..6b5d029 100644 --- a/examples/http_01/parameters.tfvars +++ b/examples/http_01/parameters.tfvars @@ -1,4 +1,4 @@ tenant_name = "eu-west-0" domain_name = "MY_DOMAIN" -endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" -region = "eu-west-0" +endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" +region = "eu-west-0" diff --git a/examples/http_01/provider.tf b/examples/http_01/provider.tf index df3824d..ac27037 100644 --- a/examples/http_01/provider.tf +++ b/examples/http_01/provider.tf @@ -4,6 +4,6 @@ provider "flexibleengine" { tenant_name = var.tenant_name domain_name = var.domain_name - auth_url = var.endpoint - region = var.region + auth_url = var.endpoint + region = var.region } diff --git a/examples/http_02/main.tf b/examples/http_02/main.tf index 6b480f2..410b5d8 100644 --- a/examples/http_02/main.tf +++ b/examples/http_02/main.tf @@ -1,5 +1,5 @@ module "elb_web" { - source = "terraform-flexibleengine-modules/elb/flexibleengine" + source = "terraform-flexibleengine-modules/elb/flexibleengine" version = "1.0.0" loadbalancer_name = "my-http-elb" @@ -21,110 +21,110 @@ module "elb_web" { vip_address = "192.168.13.148" listeners = [ - { - name = "http" - port = 80 - protocol = "HTTP" - hasCert = false - }, - { - name = "https" - port = 443 - protocol = "TERMINATED_HTTPS" - hasCert = true - } - ] - - pools = [ { - name = "poolhttp" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = 0 - }, - { - name = "poolhttps" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = 1 - } - ] + { + name = "http" + port = 80 + protocol = "HTTP" + hasCert = false + }, + { + name = "https" + port = 443 + protocol = "TERMINATED_HTTPS" + hasCert = true + } + ] + + pools = [{ + name = "poolhttp" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = 0 + }, + { + name = "poolhttps" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = 1 + } + ] backends = [ - { - name = "backend1" - port = 80 - address_index = 0 - pool_index = 0 - subnet_id = "backend1-subnet-id" - }, - { - name = "backend2" - port = 80 - 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" - } - ] - - backends_addresses = ["192.168.13.102","192.168.13.247"] - -monitorsHttp = [ - { - name = "monitor1" - pool_index = 0 - protocol = "HTTP" - delay = 20 - timeout = 10 - max_retries = 3 - 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" - } - ] - -listeners_whitelist = [ - { - enable_whitelist = true - whitelist = "192.168.11.1,192.168.0.1/24,192.168.201.18/8" - listeners_index = 0 - } -] - -l7policies = [ - { - name = "redirect_to_https" - action = "REDIRECT_TO_LISTENER" - description = "l7 policy to redirect http to https" - position = 1 - listener_index = 0 - redirect_pool_index = null - redirect_listener_index = 1 - } -] + { + name = "backend1" + port = 80 + address_index = 0 + pool_index = 0 + subnet_id = "backend1-subnet-id" + }, + { + name = "backend2" + port = 80 + 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" + } + ] + + backends_addresses = ["192.168.13.102", "192.168.13.247"] + + monitorsHttp = [ + { + name = "monitor1" + pool_index = 0 + protocol = "HTTP" + delay = 20 + timeout = 10 + max_retries = 3 + 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" + } + ] + + listeners_whitelist = [ + { + enable_whitelist = true + whitelist = "192.168.11.1,192.168.0.1/24,192.168.201.18/8" + listeners_index = 0 + } + ] + + l7policies = [ + { + name = "redirect_to_https" + action = "REDIRECT_TO_LISTENER" + description = "l7 policy to redirect http to https" + position = 1 + listener_index = 0 + redirect_pool_index = null + redirect_listener_index = 1 + } + ] } \ No newline at end of file diff --git a/examples/http_02/parameters.tfvars b/examples/http_02/parameters.tfvars index 28dfebc..6b5d029 100644 --- a/examples/http_02/parameters.tfvars +++ b/examples/http_02/parameters.tfvars @@ -1,4 +1,4 @@ tenant_name = "eu-west-0" domain_name = "MY_DOMAIN" -endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" -region = "eu-west-0" +endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" +region = "eu-west-0" diff --git a/examples/http_02/provider.tf b/examples/http_02/provider.tf index df3824d..ac27037 100644 --- a/examples/http_02/provider.tf +++ b/examples/http_02/provider.tf @@ -4,6 +4,6 @@ provider "flexibleengine" { tenant_name = var.tenant_name domain_name = var.domain_name - auth_url = var.endpoint - region = var.region + auth_url = var.endpoint + region = var.region } diff --git a/examples/http_03/main.tf b/examples/http_03/main.tf index 8521f13..dac0b40 100644 --- a/examples/http_03/main.tf +++ b/examples/http_03/main.tf @@ -1,5 +1,5 @@ module "elb_web" { - source = "terraform-flexibleengine-modules/elb/flexibleengine" + source = "terraform-flexibleengine-modules/elb/flexibleengine" version = "1.0.0" loadbalancer_name = "my-http-elb" @@ -21,105 +21,105 @@ module "elb_web" { vip_address = "192.168.13.148" listeners = [ - { - name = "https" - port = 443 - protocol = "TERMINATED_HTTPS" - hasCert = true - } - ] - - pools = [ { - name = "poolhttps" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = 0 - }, - { - name = "poolhttps2" - protocol = "HTTP" - lb_method = "ROUND_ROBIN" - listener_index = null - } - ] + { + name = "https" + port = 443 + protocol = "TERMINATED_HTTPS" + hasCert = true + } + ] + + pools = [{ + name = "poolhttps" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = 0 + }, + { + name = "poolhttps2" + protocol = "HTTP" + lb_method = "ROUND_ROBIN" + listener_index = null + } + ] backends = [ - { - name = "backend1" - port = 80 - address_index = 0 - pool_index = 0 - subnet_id = "backend1-subnet-id" - }, - { - name = "backend2" - port = 80 - address_index = 1 - pool_index = 0 - subnet_id = "backend2-subnet-id" - }, - { - name = "backend3" - port = 80 - address_index = 0 - pool_index = 1 - subnet_id = "backend3-subnet-id" - }, - { - name = "backend4" - port = 80 - address_index = 1 - pool_index = 1 - subnet_id = "backend4-subnet-id" - } - ] - - backends_addresses = ["192.168.13.102","192.168.13.247"] - -monitorsHttp = [ - { - name = "monitor1" - pool_index = 0 - protocol = "HTTP" - delay = 20 - timeout = 10 - max_retries = 3 - 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" - } - ] - -l7policies = [ - { - name = "redirect_to_https" - action = "REDIRECT_TO_LISTENER" - description = "l7 policy to redirect http to https" - position = 1 - listener_index = 0 - redirect_pool_index = 1 - redirect_listener_index = null - } -] - -l7policies_rules = [ - { - type = "PATH" - compare_type = "EQUAL_TO" - value = "/api" - l7policy_index = 0 - } -] + { + name = "backend1" + port = 80 + address_index = 0 + pool_index = 0 + subnet_id = "backend1-subnet-id" + }, + { + name = "backend2" + port = 80 + address_index = 1 + pool_index = 0 + subnet_id = "backend2-subnet-id" + }, + { + name = "backend3" + port = 80 + address_index = 0 + pool_index = 1 + subnet_id = "backend3-subnet-id" + }, + { + name = "backend4" + port = 80 + address_index = 1 + pool_index = 1 + subnet_id = "backend4-subnet-id" + } + ] + + backends_addresses = ["192.168.13.102", "192.168.13.247"] + + monitorsHttp = [ + { + name = "monitor1" + pool_index = 0 + protocol = "HTTP" + delay = 20 + timeout = 10 + max_retries = 3 + 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" + } + ] + + l7policies = [ + { + name = "redirect_to_https" + action = "REDIRECT_TO_LISTENER" + description = "l7 policy to redirect http to https" + position = 1 + listener_index = 0 + redirect_pool_index = 1 + redirect_listener_index = null + } + ] + + l7policies_rules = [ + { + type = "PATH" + compare_type = "EQUAL_TO" + value = "/api" + l7policy_index = 0 + } + ] } \ No newline at end of file diff --git a/examples/http_03/parameters.tfvars b/examples/http_03/parameters.tfvars index 28dfebc..6b5d029 100644 --- a/examples/http_03/parameters.tfvars +++ b/examples/http_03/parameters.tfvars @@ -1,4 +1,4 @@ tenant_name = "eu-west-0" domain_name = "MY_DOMAIN" -endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" -region = "eu-west-0" +endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" +region = "eu-west-0" diff --git a/examples/http_03/provider.tf b/examples/http_03/provider.tf index df3824d..ac27037 100644 --- a/examples/http_03/provider.tf +++ b/examples/http_03/provider.tf @@ -4,6 +4,6 @@ provider "flexibleengine" { tenant_name = var.tenant_name domain_name = var.domain_name - auth_url = var.endpoint - region = var.region + auth_url = var.endpoint + region = var.region } diff --git a/examples/tcp/main.tf b/examples/tcp/main.tf index 2966071..6342413 100644 --- a/examples/tcp/main.tf +++ b/examples/tcp/main.tf @@ -1,5 +1,5 @@ module "elb_logstash" { - source = "terraform-flexibleengine-modules/elb/flexibleengine" + source = "terraform-flexibleengine-modules/elb/flexibleengine" version = "1.0.0" loadbalancer_name = "my-logstash-elb" @@ -11,48 +11,48 @@ module "elb_logstash" { vip_address = "192.168.13.148" listeners = [ - { - name = "logstash" - port = 5044 - protocol = "TCP" - hasCert = false - } - ] - - pools = [ { - name = "pool_logstash" - protocol = "TCP" - lb_method = "ROUND_ROBIN" - listener_index = 0 - } - ] + { + name = "logstash" + port = 5044 + protocol = "TCP" + hasCert = false + } + ] + + pools = [{ + name = "pool_logstash" + protocol = "TCP" + lb_method = "ROUND_ROBIN" + listener_index = 0 + } + ] backends = [ - { - name = "backend1" - port = 5044 - address_index = 0 - pool_index = 0 - subnet_id = "backend1-subnet-id" - }, - { - name = "backend2" - port = 5044 - address_index = 1 - pool_index = 0 - subnet_id = "backend1-subnet-id" - } - ] - - backends_addresses = ["192.168.13.102","192.168.13.247"] - -monitors = [{ - name = "monitor1" - pool_index = 0 - protocol = "TCP" - delay = 20 - timeout = 10 - max_retries = 3 - }] + { + name = "backend1" + port = 5044 + address_index = 0 + pool_index = 0 + subnet_id = "backend1-subnet-id" + }, + { + name = "backend2" + port = 5044 + address_index = 1 + pool_index = 0 + subnet_id = "backend1-subnet-id" + } + ] + + backends_addresses = ["192.168.13.102", "192.168.13.247"] + + monitors = [{ + name = "monitor1" + pool_index = 0 + protocol = "TCP" + delay = 20 + timeout = 10 + max_retries = 3 + }] } \ No newline at end of file diff --git a/examples/tcp/parameters.tfvars b/examples/tcp/parameters.tfvars index 28dfebc..6b5d029 100644 --- a/examples/tcp/parameters.tfvars +++ b/examples/tcp/parameters.tfvars @@ -1,4 +1,4 @@ tenant_name = "eu-west-0" domain_name = "MY_DOMAIN" -endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" -region = "eu-west-0" +endpoint = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" +region = "eu-west-0" diff --git a/examples/tcp/provider.tf b/examples/tcp/provider.tf index df3824d..ac27037 100644 --- a/examples/tcp/provider.tf +++ b/examples/tcp/provider.tf @@ -4,6 +4,6 @@ provider "flexibleengine" { tenant_name = var.tenant_name domain_name = var.domain_name - auth_url = var.endpoint - region = var.region + auth_url = var.endpoint + region = var.region }