Sign inSign up

xtruder/deployer

By xtruder

•Updated about 8 years ago

auto apply terraform resources

Image
0

50K+

xtruder/deployer repository overview

⁠deployer

Apply any terraform resource by mounting them to /usr/local/deployer/inputs/, it also look for changes in *.tf and *.tf.json files, it applies them automatically.

⁠Requirements

  • etcd v3
  • Docker
  • Kubernetes (optional)

⁠Demo

To apply ./inputs/example.tf.json, for more details look in the docker-compose.yaml

$ docker-compose up --build

⁠Env variables

  • EXIT_ON_ERROR: set to exit on apply error, otherwise it will retry until success
  • EXIT_ON_SUCCESS: set to exit on successfull apply, otherwise it will retry on change

For examples look into docker-compose.yaml

⁠Kubernetes

This is sutable for configMaps volumes.

Example of configMap:

{
  "mysql": {
    "apiVersion": "v1",
    "kind": "ConfigMap",
    "data": {
      "main.tf.json": "{\"provider\":{\"mysql\":{\"endpoint\":\"mysql:3306\",\"password\":\"example\",\"username\":\"root\"}},\"resource\":{\"mysql_database\":{\"database1\":{\"lifecycle\":{\"prevent_destroy\":true},\"name\":\"database1\"}}},\"terraform\":{\"backend\":{\"etcdv3\":{\"endpoints\":[\"http://etcd:2379\"],\"prefix\":\"terraform-tfstate/\"}}}}"
    },
    "metadata": {
      "name": "mysql",
      "namespace": "default"
    }
  }
}

Tag summary

Content type

Image

Digest

Size

82.7 MB

Last updated

about 8 years ago

docker pull xtruder/deployer