hubot-terraform
v0.0.4
Published
A hubot script that interact with the Terraform API
Maintainers
Readme
hubot-terraform
A hubot script to interact with the Terraform API and allows to run terraform
projects/workspace from hubot. Refer to
terraform-api if you want
to know more about the API.
See src/terraform.js for full documentation.
Installation
In hubot project repository, run:
npm install hubot-terraform --save
Then add hubot-terraform to your external-scripts.json:
[ "hubot-terraform" ]Configuring
hubot-terraform is configured with 4 environment variables:
TERRAFORM_API__PROJECTis theterraform-apiproject usedTERRAFORM_API__WORKSPACEis theterraform-apiworkspace usedTERRAFORM_API__ENDPOINT_URListerraform-apiURLTERRAFORM_API__APIKEYisterraform-apiAPI Key used to connect
How to use the script
In order to trigger the script, you shoud run terraform <VERB> like
below:
hubot> terraform help
hubot> The list of command you can use is *apply*, *check*, *clean*,
*destroy*, *branches*, *help*, *quickcheck*, *show* or *tags*Repositories:
You can access hubot-terraform from:
A simple way to test Hubot-Terraform
If you have cloned the git repository, you can easily test hubot in
shell/interactive mode. In order to do it, run the docker-compose.yml
to start a sample terraform API and run the killmonger script:
cd terraform-api
docker-compose up -d
cd ../killmonger
bin/killmongerYou should be able to interact with a simple command like below:
killmonger> killmonger terraform help
killmonger> Shell: The list of command you can use is *apply*, *check*,
*clean*, *destroy*, *branches*, *help*, *quickcheck*, *show* or *tags*
killmonger> 