From 5155729ddba562ee073b500d48e43140efa4125e Mon Sep 17 00:00:00 2001 From: Anouar Chattouna Date: Tue, 26 Jan 2021 12:00:01 +0100 Subject: [PATCH 1/3] Updating consul service configuration Replaced deprecated 'ui' field by 'ui_config' object: 'https://www.consul.io/docs/agent/options\#ui-1' Added 'telemetry { disable_compat_1.9 = true }' to disable metrics deprecated in v1.9: 'https://www.consul.io/docs/agent/options\#telemetry-disable_compat_1.9' --- modules/run-consul/run-consul | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/run-consul/run-consul b/modules/run-consul/run-consul index 204fcdff..ffb5dece 100755 --- a/modules/run-consul/run-consul +++ b/modules/run-consul/run-consul @@ -239,7 +239,8 @@ function generate_consul_config { local instance_id="" local instance_ip_address="" local instance_region="" - local ui="false" + # https://www.consul.io/docs/agent/options#ui-1 + local ui_config_enabled="false" instance_id=$(get_instance_id) instance_ip_address=$(get_instance_ip_address) @@ -274,7 +275,7 @@ EOF cluster_size=$(get_cluster_size "$instance_tags" "$instance_region") bootstrap_expect="\"bootstrap_expect\": $cluster_size," - ui="true" + ui_config_enabled="true" fi local autopilot_configuration @@ -327,7 +328,12 @@ EOF $gossip_encryption_configuration $rpc_encryption_configuration $autopilot_configuration - "ui": $ui + "telemetry": { + "disable_compat_1.9": true + }, + "ui_config": { + "enabled": $ui_config_enabled + } } EOF ) From f43058458136f8f8735d5e2ebd678866d763a5bf Mon Sep 17 00:00:00 2001 From: Anouar Chattouna Date: Tue, 26 Jan 2021 12:00:11 +0100 Subject: [PATCH 2/3] Bumping versions bump 'min_packer_version' -> 1.5.4 bump 'consul_version' -> 1.9.2 --- examples/consul-ami/consul.json | 2 +- .../example-with-encryption/packer/consul-with-certs.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/consul-ami/consul.json b/examples/consul-ami/consul.json index 0cbaaf8e..423ca71b 100644 --- a/examples/consul-ami/consul.json +++ b/examples/consul-ami/consul.json @@ -2,7 +2,7 @@ "min_packer_version": "1.5.4", "variables": { "aws_region": "us-east-1", - "consul_version": "1.5.1", + "consul_version": "1.9.2", "download_url": "{{env `CONSUL_DOWNLOAD_URL`}}" }, "builders": [{ diff --git a/examples/example-with-encryption/packer/consul-with-certs.json b/examples/example-with-encryption/packer/consul-with-certs.json index 76ed6060..0f72b190 100644 --- a/examples/example-with-encryption/packer/consul-with-certs.json +++ b/examples/example-with-encryption/packer/consul-with-certs.json @@ -1,8 +1,8 @@ { - "min_packer_version": "0.12.0", + "min_packer_version": "1.5.4", "variables": { "aws_region": "us-east-1", - "consul_version": "1.0.5", + "consul_version": "1.9.2", "ca_public_key_path": "{{template_dir}}/ca.crt.pem", "tls_public_key_path": "{{template_dir}}/consul.crt.pem", "tls_private_key_path": "{{template_dir}}/consul.key.pem" From 8b89fb6f2962a0d2f123b8d0d8780ba028f70a94 Mon Sep 17 00:00:00 2001 From: Anouar Chattouna Date: Wed, 17 Feb 2021 12:32:08 +0100 Subject: [PATCH 3/3] remove extra space line --- examples/example-with-custom-asg-role/main.tf | 1 - examples/example-with-custom-asg-role/outputs.tf | 1 - examples/example-with-custom-asg-role/variables.tf | 1 - examples/example-with-encryption/main.tf | 1 - examples/example-with-encryption/outputs.tf | 1 - examples/example-with-encryption/variables.tf | 1 - main.tf | 1 - outputs.tf | 1 - 8 files changed, 8 deletions(-) diff --git a/examples/example-with-custom-asg-role/main.tf b/examples/example-with-custom-asg-role/main.tf index 0f134d9a..743e8479 100644 --- a/examples/example-with-custom-asg-role/main.tf +++ b/examples/example-with-custom-asg-role/main.tf @@ -159,4 +159,3 @@ data "aws_subnet_ids" "default" { data "aws_region" "current" { } - diff --git a/examples/example-with-custom-asg-role/outputs.tf b/examples/example-with-custom-asg-role/outputs.tf index 347e1219..493b36c2 100644 --- a/examples/example-with-custom-asg-role/outputs.tf +++ b/examples/example-with-custom-asg-role/outputs.tf @@ -57,4 +57,3 @@ output "consul_servers_cluster_tag_key" { output "consul_servers_cluster_tag_value" { value = module.consul_servers.cluster_tag_value } - diff --git a/examples/example-with-custom-asg-role/variables.tf b/examples/example-with-custom-asg-role/variables.tf index a7f5025a..387fac5d 100644 --- a/examples/example-with-custom-asg-role/variables.tf +++ b/examples/example-with-custom-asg-role/variables.tf @@ -101,4 +101,3 @@ variable "consul_service_linked_role_suffix" { type = string default = "test-consul-service-linked-role" } - diff --git a/examples/example-with-encryption/main.tf b/examples/example-with-encryption/main.tf index d29402cd..e04f6520 100644 --- a/examples/example-with-encryption/main.tf +++ b/examples/example-with-encryption/main.tf @@ -149,4 +149,3 @@ data "aws_subnet_ids" "default" { data "aws_region" "current" { } - diff --git a/examples/example-with-encryption/outputs.tf b/examples/example-with-encryption/outputs.tf index 347e1219..493b36c2 100644 --- a/examples/example-with-encryption/outputs.tf +++ b/examples/example-with-encryption/outputs.tf @@ -57,4 +57,3 @@ output "consul_servers_cluster_tag_key" { output "consul_servers_cluster_tag_value" { value = module.consul_servers.cluster_tag_value } - diff --git a/examples/example-with-encryption/variables.tf b/examples/example-with-encryption/variables.tf index 2f741e84..9187e889 100644 --- a/examples/example-with-encryption/variables.tf +++ b/examples/example-with-encryption/variables.tf @@ -95,4 +95,3 @@ variable "key_file_path" { type = string default = "/opt/consul/tls/consul.key.pem" } - diff --git a/main.tf b/main.tf index 2574c01f..ec118d88 100644 --- a/main.tf +++ b/main.tf @@ -176,4 +176,3 @@ data "aws_subnet_ids" "default" { data "aws_region" "current" { } - diff --git a/outputs.tf b/outputs.tf index 347e1219..493b36c2 100644 --- a/outputs.tf +++ b/outputs.tf @@ -57,4 +57,3 @@ output "consul_servers_cluster_tag_key" { output "consul_servers_cluster_tag_value" { value = module.consul_servers.cluster_tag_value } -