Terraform provider to configure JIRA
Terraform Provider for managing JIRA. (View on registry.terraform.io)
This can be used to interlink infrastructure management with JIRA issues closely.
| Version | Status |
|---|---|
| Latest | Tested in CI |
| 7.x | Untested |
| Cloud | Untested |
Copy this code into yout terraform configuration file (for example main.tf)
terraform {
required_providers {
jira = {
source = "fourplusone/jira"
version = "0.1.16"
}
}
}Run terraform init
Set JIRA URL, Username and Password using environment variables
export JIRA_URL=http://localhost:8080
export JIRA_USER=username
export JIRA_PASSWORD=passwordIt's also possible to use an API-Token from JIRA cloud. In this case, set
export JIRA_URL=https://yourinstance.atlassian.net
export [email protected]
export JIRA_PASSWORD=Create terraform config file
…Run terraform init
terraform init
Initializing provider plugins...
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.Run terraform plan
terraform planCheck if the terraform plan looks good
Run terraform apply
terraform applyIf you wish to work on the provider, you'll first need Go installed on your machine.
Note: This project uses Go Modules making it safe to work with it outside of your existing GOPATH. The instructions that follow assume a directory in your home directory outside of the standard GOPATH (i.e $HOME/development/terraform-providers/).
Clone repository to: $HOME/development/terraform-providers/
$ mkdir -p $HOME/development/terraform-providers/; cd $HOME/development/terraform-providers/
$ git clone [email protected]:fourplusone/terraform-provider-jira
...Enter the provider directory and run make build to build the provider
$ make buildTesting requires a JIRA instance. To set up a temporary, local JIRA instance you can use the Docker Atlas container:
$ git clone https://github.com/fourplusone/docker-atlas
$ cd docker-atlas
$ docker build -f jira.dockerfile . -t jira-docker
$ docker run --rm -t -p 2990:2990 jira-dockerBuilding and starting the JIRA instance will take several minutes.
To run the tests, run make test inside the provider folder
$ make testWorking in Operations engineering organizations infrastructure is often driven by tickets. Why not track infrastructure using tickets but this time we will use code. This just showcases that you can pretty much Terraform anything!
No open issues yet, or sync has not completed.