![](https://github.com/tkaburagi/consul-terraform-sync-demo/raw/main/pic.png?raw=true)
- intall ct-sync
git clone https://github.com/tkaburagi/consul-terraform-sync-demo
cd tf-code/infra
terraform init
terraform plan
terraform apply
- Copy
CONSUL ADDR
,BIG IP ADDR
andBIG IP PASSWORD
from output
cd ../..
./replacer <CONSULADDR BIGIPADDR PASSWORD>
cat config.hcl
consul-terraform-sync -config-file config.hcl
- After Running CTS, check the terraform will run for syncing between Consul and F5 BIG IP
- See the
sync-task
directroy is created. The tf-code and variables will be generated under thesync-task
. - Access to
http://BIGIPADDR:8080
for confirming load balancing. - Scale out/in AWS Autoscaling group and see the CTS log. It will sync the env automatically!!
- tfstate will be store at Consul kv.