mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-09 18:00:40 +00:00
Woodpecker CI plugin to manage infrastructure with OpenTofu
714d496249
Add terraform '-parallelism=' option |
||
---|---|---|
.drone.sec | ||
.drone.yml | ||
.gitignore | ||
Dockerfile | ||
DOCS.md | ||
LICENSE | ||
logo.svg | ||
main.go | ||
MAINTAINERS | ||
Makefile | ||
README.md |
drone-terraform
Drone plugin to execute Terraform plan and apply. For the usage information and a listing of the available options please take a look at the docs.
Binary
Build the binary using make
:
make deps build
Example
./drone-terraform <<EOF
{
"repo": {
"clone_url": "git://github.com/drone/drone",
"owner": "drone",
"name": "drone",
"full_name": "drone/drone"
},
"system": {
"link_url": "https://beta.drone.io"
},
"build": {
"number": 22,
"status": "success",
"started_at": 1421029603,
"finished_at": 1421029813,
"message": "Update the Readme",
"author": "johnsmith",
"author_email": "john.smith@gmail.com",
"event": "push",
"branch": "master",
"commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
"ref": "refs/heads/master"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/github.com/drone/drone"
},
"vargs": {
"plan": false,
"remote": {
"backend": "S3",
"config": {
"bucket": "my-terraform-config-bucket",
"key": "tf-states/my-project",
"region": "us-east-1"
}
},
"vars": {
"app_name": "my-project",
"app_version": "1.0.0"
}
}
}
EOF
Docker
Build the container using make
:
make deps docker
Example
docker run -i plugins/drone-terraform <<EOF
{
"repo": {
"clone_url": "git://github.com/drone/drone",
"owner": "drone",
"name": "drone",
"full_name": "drone/drone"
},
"system": {
"link_url": "https://beta.drone.io"
},
"build": {
"number": 22,
"status": "success",
"started_at": 1421029603,
"finished_at": 1421029813,
"message": "Update the Readme",
"author": "johnsmith",
"author_email": "john.smith@gmail.com",
"event": "push",
"branch": "master",
"commit": "436b7a6e2abaddfd35740527353e78a227ddcb2c",
"ref": "refs/heads/master"
},
"workspace": {
"root": "/drone/src",
"path": "/drone/src/github.com/drone/drone"
},
"vargs": {
"plan": false,
"remote": {
"backend": "S3",
"config": {
"bucket": "my-terraform-config-bucket",
"key": "tf-states/my-project",
"region": "us-east-1"
}
},
"vars": {
"app_name": "my-project",
"app_version": "1.0.0"
}
}
}
EOF