A Terraform provider for configuring the Drone continuous delivery platform.
You can download the plugin from the Releases page, for help installing please refer to the Official Documentation.
provider "drone" {
server = "https:://ci.example.com/"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoib2N0b2NhdCIsInR5cGUiOiJ1c2VyIn0.Fg0eYxO9x2CfGIvIHDZKhQbCGbRAsSB_iRDJlDEW6vc"
}
resource "drone_repo" "hello_world" {
repository = "octocat/hello-world"
visability = "public"
hooks = ["push", "pull_request", "tag", "deployment"]
}
resource "drone_secret" "master_password" {
repository = "${resource.hello_world.repository}"
name = "master_password"
value = "correct horse battery staple"
events = ["push", "pull_request", "tag", "deployment"]
}
provider "drone" {
server = "https://ci.example.com/"
token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoib2N0b2NhdCIsInR5cGUiOiJ1c2VyIn0.Fg0eYxO9x2CfGIvIHDZKhQbCGbRAsSB_iRDJlDEW6vc"
}
server
- (Optional) The Drone servers url, It must be provided, but can also be sourced from theDRONE_SERVER
environment variable.token
- (Optional) The Drone servers api token, It must be provided, but can also be sourced from theDRONE_TOKEN
environment variable.
Manage a repository registry.
resource "drone_registry" "docker_io" {
repository = "octocat/hello-world"
address = "docker.io"
username = "octocat"
password = "correct horse battery staple"
}
repository
- (Required) Repository name (e.g.octocat/hello-world
).address
- (Required) Registry address.username
- (Required) Registry username.password
- (Required) Registry password.
Activate and configure a repository.
resource "drone_repo" "hello_world" {
repository = "octocat/hello-world"
visability = "public"
hooks = ["push", "pull_request", "tag", "deployment"]
}
repository
- (Required) Repository name (e.g.octocat/hello-world
).trusted
- (Optional) Repository is trusted (default:false
).gated
- (Optional) Repository is gated (default:false
).timeout
- (Optional) Repository timeout (default:0
).visibility
- (Optional) Repository visibility (default:private
).hooks
- (Optional) List of hooks this repository should setup is limited to, values must bepush
,pull_request
,tag
, and/ordeployment
.
Manage a repository secret.
resource "drone_secret" "master_password" {
repository = "octocat/hello-world"
name = "master_password"
value = "correct horse battery staple"
events = ["push", "pull_request", "tag", "deployment"]
}
repository
- (Required) Repository name (e.g.octocat/hello-world
).name
- (Required) Secret name.value
- (Required) Secret value.images
- (Optional) List of images this secret is limited to.events
- (Optional) List of events this repository should setup is limited to, values must bepush
,pull_request
,tag
, and/ordeployment
(default:["push", "tag", "deployment"]
).
Manage a user.
resource "drone_user" "octocat" {
login = "octocat"
}
login
- (Required) Login name.
To install from source:
git clone git://github.com/artisanofcode/terraform-provider-drone.git
cd terraform-provider-drone
go get
go build
This project is licensed under the MIT licence.
This project uses Semantic Versioning.