Fix can't create tfstate container

This commit is contained in:
Khue Doan 2021-06-08 20:37:39 +07:00
parent f7a02d99b3
commit 9b458435e0
2 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,11 @@
terraform {
# TODO (feature) Generate endpoint automatically (terragrunt for variable)
#backend "etcdv3" {
# endpoints = ["192.168.1.110:2379"]
# lock = true
#}
backend "etcdv3" {
endpoints = [
"192.168.1.110:23799"
]
lock = true
}
required_providers {
rke = {

View File

@ -1,3 +1,7 @@
- name: Install Python library for the Docker
dnf:
name: python-docker
- name: Create etcd container
docker_container:
name: etcd-tfstate
@ -6,6 +10,6 @@
env:
ALLOW_NONE_AUTHENTICATION: "yes"
published_ports:
- 2379:2379
- 23799:2379
volumes:
- tfstate:/bitnami/etcd/data