The gitlab_integration_jira
resource allows to manage the lifecycle of a project integration with Jira.
Upstream API: GitLab REST API docs
resource "gitlab_project" "awesome_project" {
name = "awesome_project"
description = "My awesome project."
visibility_level = "public"
}
resource "gitlab_integration_jira" "jira" {
project = gitlab_project.awesome_project.id
url = "https://jira.example.com"
username = "user"
password = "mypass"
}
password
(String, Sensitive) The password of the user created to be used with GitLab/JIRA.project
(String) ID of the project you want to activate integration on.url
(String) The URL to the JIRA project which is being linked to this GitLab project. For example, https://jira.example.com.username
(String) The username of the user created to be used with GitLab/JIRA.api_url
(String) The base URL to the Jira instance API. Web URL value is used if not set. For example, https://jira-api.example.com.comment_on_event_enabled
(Boolean) Enable comments inside Jira issues on each GitLab event (commit / merge request)commit_events
(Boolean) Enable notifications for commit eventsissues_events
(Boolean) Enable notifications for issues events.jira_issue_transition_id
(String) The ID of a transition that moves issues to a closed state. You can find this number under the JIRA workflow administration (Administration > Issues > Workflows) by selecting View under Operations of the desired workflow of your project. By default, this ID is set to 2. Note*: importing this field is only supported since GitLab 15.2.job_events
(Boolean) Enable notifications for job events.merge_requests_events
(Boolean) Enable notifications for merge request eventsnote_events
(Boolean) Enable notifications for note events.pipeline_events
(Boolean) Enable notifications for pipeline events.project_key
(String) The short identifier for your JIRA project, all uppercase, e.g., PROJ.push_events
(Boolean) Enable notifications for push events.tag_push_events
(Boolean) Enable notifications for tag_push events.active
(Boolean) Whether the integration is active.created_at
(String) Create time.id
(String) The ID of this resource.title
(String) Title.updated_at
(String) Update time.Import is supported using the following syntax:
# You can import a gitlab_integration_jira state using the project ID, e.g.
terraform import gitlab_integration_jira.jira 1