Lucretius / terraform-provider-drone

A terraform provider for drone.io
MIT License
12 stars 6 forks source link

registry Actions Status

Drone Terraform Provider

This is a fork of this Drone provider which does not appear to be maintained anymore. A Terraform provider for configuring the Drone continuous delivery platform.

Installing

You can download the plugin from the Releases page, for help installing please refer to the Official Documentation.

Example

provider "drone" {
  server = "https:://ci.example.com/"
  token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoib2N0b2NhdCIsInR5cGUiOiJ1c2VyIn0.Fg0eYxO9x2CfGIvIHDZKhQbCGbRAsSB_iRDJlDEW6vc"
}

resource "drone_repo" "hello_world" {
  repository = "octocat/hello-world"
  visibility = "public"
}

resource "drone_secret" "master_password" {
  repository = "${resource.hello_world.repository}"
  name       = "master_password"
  value      = "correct horse battery staple"
}

resource "drone_cron" "cron_job" {
  repository = "${resource.hello_world.repository}"
  name = "cron_job_1"
  expr = "@monthly"
  branch = "test"
}

Provider

Example Usage

provider "drone" {
  server = "https://ci.example.com/"
  token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoib2N0b2NhdCIsInR5cGUiOiJ1c2VyIn0.Fg0eYxO9x2CfGIvIHDZKhQbCGbRAsSB_iRDJlDEW6vc"
}

Argument Reference

Resources

drone_repo

Activate and configure a repository.

Example Usage

resource "drone_repo" "hello_world" {
  repository = "octocat/hello-world"
  visibility = "public"
}

Argument Reference

drone_secret

Manage a repository secret.

Example Usage

resource "drone_secret" "master_password" {
  repository = "octocat/hello-world"
  name       = "master_password"
  value      = "correct horse battery staple"
}

Argument Reference

drone_cron

Manage a repository cron job.

Example Usage

resource "drone_cron" "cron_job" {
  repository = "octocat/hello-world"
  name       = "the_cron_job"
  expr       = "@monthly"
  event      = "push"
}

Argument Reference

drone_user

Manage a user.

Example Usage

resource "drone_user" "octocat" {
  login = "octocat"
}
Note: In order to use the `drone_user` resource you must have admin privileges within your Drone environment.

Argument Reference

Attributes Reference

Source

To install from source:

git clone git://github.com/Lucretius/terraform-provider-drone.git
cd terraform-provider-drone
go get
go build

Licence

This project is licensed under the MIT licence.

Meta

This project uses Semantic Versioning.