2016-02-21 11:38:13 +00:00
|
|
|
# drone-terraform
|
2015-11-10 14:52:53 +00:00
|
|
|
|
2016-10-20 14:34:28 +00:00
|
|
|
[![Build Status](http://beta.drone.io/api/badges/jmccann/drone-terraform/status.svg)](http://beta.drone.io/jmccann/drone-terraform)
|
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
Drone plugin to execute Terraform plan and apply. For the usage information and
|
2017-11-10 15:13:56 +00:00
|
|
|
a listing of the available options please take a look at [the docs](https://github.com/jmccann/drone-terraform/blob/master/DOCS.md).
|
2015-11-10 14:52:53 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
## Build
|
2015-11-10 14:52:53 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
Build the binary with the following commands:
|
2016-02-21 11:38:13 +00:00
|
|
|
|
|
|
|
```
|
2019-02-22 14:40:57 +00:00
|
|
|
export GO111MODULE=on
|
|
|
|
go mod download
|
2016-10-20 14:21:42 +00:00
|
|
|
go test
|
2019-02-22 14:40:57 +00:00
|
|
|
go build
|
2016-02-21 11:38:13 +00:00
|
|
|
```
|
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
## Docker
|
2016-02-21 11:38:13 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
Build the docker image with the following commands:
|
2016-02-21 11:38:13 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
```
|
|
|
|
docker build --rm=true -t jmccann/drone-terraform .
|
|
|
|
```
|
2016-02-21 11:38:13 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
## Usage
|
2016-02-21 11:38:13 +00:00
|
|
|
|
2016-10-20 14:21:42 +00:00
|
|
|
Execute from the working directory:
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run --rm \
|
|
|
|
-v $(pwd):$(pwd) \
|
|
|
|
-w $(pwd) \
|
2017-09-06 18:52:01 +00:00
|
|
|
jmccann/drone-terraform:latest --plan
|
2016-02-21 11:38:13 +00:00
|
|
|
```
|
2016-12-22 14:20:05 +00:00
|
|
|
|
|
|
|
## Drone 0.4
|
|
|
|
|
|
|
|
Legacy `drone-terraform` plugin exists @ `jmccann/drone-terraform:0.4`
|