Terraform Provider for creating, updating and deleting JIRA issues. This can be used to interlink infrastructure management with JIRA issues closely.
- Download
terraform-provider-jirabinary from Github - Unzip the zip file
- Then move
terraform-provider-jirabinary to$HOME/.terraform.d/pluginsdirectory
mkdir -p $HOME/.terraform.d/plugins
mv terraform-provider-jira $HOME/.terraform.d/plugins/terraform-provider-jira
- Run
terraform initin your terraform project
terraform initUsed to initialize the plugin
Set JIRA URL, Username and Password using environment variables
export JIRA_URL=http://localhost:8080
export JIRA_USER=username
export JIRA_PASSWORD=passwordCreate terraform config file
resource "jira_issue" "example" {
assignee = "anubhavmishra"
reporter = "anubhavmishra"
issue_type = "Task"
// description is optional
description = "This is a test issue"
summary = "Created using Terraform"
project_key = "PROJ"
}Run terraform init
terraform initInitializing 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 applyWorking 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!
