Skip to content

Commit

Permalink
Merge pull request kapicorp#93 from mumoshu/terraform-readme
Browse files Browse the repository at this point in the history
README for the terraform example
  • Loading branch information
gburiola authored May 10, 2018
2 parents d7ba2af + f6d9041 commit 1effffa
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions examples/terraform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Using Kapitan to generate Terraform configuration

kapitan can be used to generate `*.tf.json` with jsonnet and jinja2.

Running `kapitan compile` in this directory would produce 3 terraform projects named `project1`, `project2`, and `project3`:

```
$ docker run -t --rm -v $(pwd):/src:delegated deepmind/kapitan compile
Compiled project3 (0.32s)
Compiled project1 (0.39s)
Compiled project2 (0.41s)
$ tree compiled
compiled
├── project1
│   └── manifests
│   ├── dns.tf.json
│   ├── output.tf.json
│   └── provider.tf.json
├── project2
│   └── manifests
│   ├── container.tf.json
│   ├── output.tf.json
│   └── provider.tf.json
└── project3
└── manifests
├── container.tf.json
├── output.tf.json
└── provider.tf.json
6 directories, 9 files
```

You can now run `terraform` commands as usual:

```
$ cd compiled/project1/manifests
$ terraform init
$ terraform plan
$ terraform apply
```

0 comments on commit 1effffa

Please sign in to comment.