Terraform Drone provider
You should define env vars DRONE_SERVER
and DRONE_TOKEN
, as you would for using drone CLI.
This provider supports two kinds of resources:
With resource name drone_activated_repository
resource "drone_activated_repository" "my-repository" {
name = "orga/repoName"
allow_tag = false
allow_deploy = false
allow_pull = true
is_protected = true
is_trusted = true
}
With resource name drone_secret
resource "drone_secret" "my-secret" {
name = "secretName"
repository = "orga/repoName"
value = "$ECRET"
events = [ "push", "pull_request", "tag" ]
}
go get ./...
go build -o terraform-provider-drone
go build -o terraform-provider-drone && terraform init && TF_LOG=DEBUG terraform apply