Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Update agent configuration #208

Merged
merged 3 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/consul-ami/consul.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [{
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
12 changes: 9 additions & 3 deletions modules/run-consul/run-consul
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
)
Expand Down