Working etcd backend for terraform

This commit is contained in:
Khue Doan 2021-02-12 21:24:13 +07:00
parent 59e5624c02
commit 6b6f65893f
2 changed files with 12 additions and 4 deletions

6
infra/lxd/terraform.tf Normal file
View File

@ -0,0 +1,6 @@
terraform {
backend "etcdv3" {
endpoints = [ "localhost:2379" ]
lock = true
}
}

View File

@ -1,8 +1,10 @@
- name: Create etcd container
docker_container:
name: etcd-tfstate
image: quay.io/coreos/etcd
exposed_ports:
- 2379
image: bitnami/etcd
env:
ALLOW_NONE_AUTHENTICATION: "yes"
published_ports:
- 2379:2379
volumes:
- default.etcd
- /bitnami/etcd/data