atlcloudjira_workflow_scheme (Resource)

Example Usage

import {
  to = atlcloudjira_workflow_scheme.SampleWorkflowSchemeResource
  id = "10022"
}

# __generated__ by Terraform
# Please review these resources and move them into your main configuration files.

# __generated__ by Terraform from "10022"

resource "atlcloudjira_workflow_scheme" "TestWorkflowSchemeResource" {
  name                = "Test Workflow Scheme"
  description         = "Test description"
  default_workflow_id = "5a48e58d-7ee5-4646-b485-5f943dc02b7f"
  scope = {
    type = "GLOBAL"
  }
  workflow_issue_type_mapping = [
    {
      issue_type_ids = ["10000", "10001"]
      workflow_id    = "9306c5a2-0485-47b3-b78a-d9b4e1739261"
    },
    {
      issue_type_ids = ["10002", "10009"]
      workflow_id    = "5a48e58d-7ee5-4646-b485-5f943dc02b7f"
    },
  ]

  /* Attributes below required only during resource destruction */
  replace_with = 10039
  status_mappings_by_workflows = [
    {
      new_workflow_id = "9306c5a2-0485-47b3-b78a-d9b4e1739261"
      old_workflow_id = " 5a48e58d-7ee5-4646-b485-5f943dc02b7f"
      status_mappings = [
        {
          new_status_id = "3"
          old_status_id = "10007"
        },
        {
          new_status_id = "3"
          old_status_id = "10002"
        },
      ]
    },

    {
      new_workflow_id = "5a48e58d-7ee5-4646-b485-5f943dc02b7f"
      old_workflow_id = " jira"
      status_mappings = [
        {
          new_status_id = "3"
          old_status_id = "1"
        },
        {
          new_status_id = "3"
          old_status_id = "4"
        },
        {
          new_status_id = "3"
          old_status_id = "5"
        },
        {
          new_status_id = "3"
          old_status_id = "6"
        },
      ]
    },
  ]

  status_mappings_by_issue_types = [
    {
      issue_type_id = "10000"
      status_mappings = [
        {
          new_status_id = "3"
          old_status_id = "10007"
        },
        {
          new_status_id = "3"
          old_status_id = "10002"
        },
      ]
    },

    {
      issue_type_id = "10004"
      status_mappings = [
        {
          new_status_id = "3"
          old_status_id = "1"
        },
        {
          new_status_id = "3"
          old_status_id = "4"
        },
        {
          new_status_id = "3"
          old_status_id = "5"
        },
        {
          new_status_id = "3"
          old_status_id = "6"
        },
      ]
    },
  ]
}

Schema

Required

  • name (String) The name of the workflow scheme.

Optional

  • default_workflow_id (String) The workflow ID associated with default issue types.

  • description (String) The description of the workflow scheme.

  • replace_with (String) Helper attribute. Required while destroying resource. Workflow Scheme will be replaced with provided ID in all associated projects to allow removal.

  • scope (Attributes) The scope of the workflow scheme. (see below for nested schema)

  • status_mappings_by_issue_types (Attributes Set) Helper attribute. Used to map workflows that are going to be deprecated from scheme. While deleting error message show what needs to be for proper operation.

Overrides, for the selected issue types, any status mappings provided in statusMappingsByWorkflows. Status mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status mappings can be provided by a combination of statusMappingsByWorkflows and statusMappingsByIssueTypeOverride. (see below for nested schema)

  • status_mappings_by_workflows (Attributes Set) Helper attribute. Used to map workflows that are going to be deprecated from scheme. While deleting error message show what needs to be for proper operation.

The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status mappings can be provided by a combination of statusMappingsByWorkflows and statusMappingsByIssueTypeOverride. (see below for nested schema)

  • workflow_issue_type_mapping (Attributes Set) Mappings from workflows to issue types. (see below for nested schema)

Read-Only

  • associated_project_ids (Set of Number) IDs of projects associated with workflow sheme.

  • id (String) The ID of the workflow scheme.

  • last_updated (String) Timestamp of the last Terraform update of the Workflow Scheme.

  • version_id (String) The current UUID version details of this workflow scheme.

  • version_number (String) The version number.

Nested Schema for scope

Optional:

  • project (Attributes) Project ID details. Used in workflow schemes associated with team-managed projects. (see below for nested schema)

  • type (String) Valid values: PROJECT, GLOBAL. The scope of the workflow. GLOBAL for company-managed projects and PROJECT for team-managed projects.

Nested Schema for scope.project

Optional:

  • id (String) Project ID.

Nested Schema for status_mappings_by_issue_types

Optional:

  • issue_type_id (String) Issue type ID associated with deprecated/new workflow.

  • status_mappings (Attributes Set) Helper attribute. While destroying resource without proper mapping, provider will show message with mapping to be filled. (see below for nested schema)

Nested Schema for status_mappings_by_issue_types.status_mappings

Optional:

  • new_status_id (String) Status ID that is introduced into workflow scheme. Issues will be mapped to new ID.

  • old_status_id (String) Status ID that is disappearing from workflow scheme. Issues will be mapped to new ID.

Nested Schema for status_mappings_by_workflows

Optional:

  • new_workflow_id (String) New workflow ID that we want to introduce to workflow scheme.

  • old_workflow_id (String) Deprecated workflow ID that we want to remove from workflow scheme.

  • status_mappings (Attributes Set) Status mapping between new/deprecated workflow. Used to migrate issue statuses to new workflow. (see below for nested schema)

Nested Schema for status_mappings_by_workflows.status_mappings

Optional:

  • new_status_id (String)

  • old_status_id (String)

Nested Schema for workflow_issue_type_mapping

Optional:

  • issue_type_ids (Set of String)

  • workflow_id (String) Workflow Id associated with given issue type or default.