Files
infra-provisioner/README.md

36 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2020-01-13 18:49:36 +05:30
# infra-provisioner
This tool provisions infra resources like rds, s3 on demand with details given in `infra_manifest`.
2020-01-14 15:40:52 +05:30
2020-01-13 18:49:36 +05:30
Simply explained, its a thin wrapper over terraform to hide the complexities like hcl, remote backend, targeted resources etc when provisioning resources.
2020-01-14 15:40:52 +05:30
## Usage Guide
##### Install
`go get -u -v github.cmd.navi-tech.in/navi-infra/infra-provisioner`
##### Check templates generated
`infra-provisioner --manifest sample_infra_manifest.json --template-only database`
2020-01-14 16:26:20 +05:30
##### Run plan for resources
`infra-provisioner --manifest sample_infra_manifest.json --plan database`
2020-01-14 15:40:52 +05:30
##### Provision resource
`infra-provisioner --manifest sample_infra_manifest.json database`
---
## Development Guide
##### Typical workflow
- Add templates to your resource in templates folder
- Make changes to cli to support new resource
- Package templates with `go-bindata`
- Dry run with `go run *.go --manifest sample_infra_manifest.json --template-only resourceName`
2020-01-14 15:40:52 +05:30
##### Package templates
```
go get github.com/shuLhan/go-bindata/cmd/go-bindata
go-bindata -o bindata/ templates/...
2020-01-14 15:40:52 +05:30
```
## Caveats
1. Interrupts, term signals are not handled when code execution moves to bash.