Jira Service Management is getting a new navigation

We’re in the process of rolling out these changes and the documentation may not match your experience. Bear with us while we update it to reflect the new changes. More about navigating the new Jira

·

Set up Atlassian Operations Terraform Provider

The Atlassian Operations Terraform Provider allows you to interact with Jira Service Management resources such as users, teams, escalations, and more. By defining your resources in declarative configuration files, you can easily code, edit, review, and version-control your IT operations configurations.

View the Atlassian Operations Terraform Provider repository on GitHub.

Supported resources and data sources

This provider supports the creation and management of the following resources and data sources via Terraform:

Data Sources (Read Only)

  • Users (excludes User Contact API)

  • Teams

  • Schedules

Resources (Read / Write - CRUD)

Terraform cannot update team admins

Since the user who creates a team automatically becomes its admin, and the provider can only support actions currently available via the Jira Service Management Operations REST API, you cannot update team admins with Terraform.

Configure the Terraform Provider

To set up the Atlassian Operations Terraform Provider, include atlassian-operations in the required_providersblock of your Terraform configuration. Ensure that you configure the provider with valid credentials before using it.

Required configuration parameters

The provider requires the following parameters:

  1. cloud_id: The simplest way to find your site's Cloud ID is throughhttps://<your-site-name>.atlassian.net/_edge/tenant_info

  2. domain_name - Your site's URL, e.g., my-site-name.atlassian.net

  3. email_address

  4. token - You can list your existing Atlassian API tokens or create new ones by managing API token for your Atlassian account.

Sample configuration

Below is an example Terraform configuration:

terraform { required_providers { atlassian-operations = { source = "registry.terraform.io/atlassian/atlassian-operations" } } } provider "atlassian-operations" { cloud_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" domain_name = "xxxx.atlassian.net" email_address = "[email protected]" token = "<YOUR_TOKEN_HERE>" }

For more details, visit Atlassian Operations provider page and view the documentation to explore available resources. You can find them listed on the left menu of the documentation page. Currently, the provider supports six resources and three data sources.

To get started with Terraform using this provider, refer to the Terraform tutorials.

Using data sources

User Data Source

To fetch a user, you need to provide an email address.

# Get Atlassian User by email address data "atlassian-operations_user" "example" { email_address = "[email protected]" }

Team Data Source

To fetch a team, both the team id and the organization id are required.

To find the Organization ID view what is Organization ID an where to find it

# Get Atlassian Operations Teams by organization ID and team ID data "atlassian-operations_team" "example" { organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" }

Schedule Data Source

To fetch a schedule, you need to specify its name

# Get Atlassian Operations Schedule by name data "atlassian-operations_schedule" "example" { name = "Test schedule" }

Using resources

Team resource

Required resources:

  • description (String) The description of the team

  • display_name (String) The display name of the team

  • member (Attributes Set) The members of the team

    • account_id (String) The account ID of the user

  • organization_id (String) The organization ID of the team

  • team_type (String) The type of the team

Optional resources:

  • site_id (String) The site ID of the team

Read-only resources:

  • id (String) The ID of the team

  • user_permissions (Attributes) The user permissions of the team

    • add_members (Boolean) The permission to add members to the team

    • delete_team (Boolean) The permission to delete the team

    • remove_members (Boolean) The permission to remove members from the team

    • update_team (Boolean) The permission to update the team

To find the Organization ID view what is Organization ID an where to find it

Example Configuration

resource "atlassian-operations_team" "example" { organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" description = "This is a team created by Terraform" display_name = "Terraform Team" team_type = "MEMBER_INVITE" member = [ { account_id = "XXXXXX:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ] }

Schedule resource

Required resources:

  • name (String) The name of the schedule

  • team_id (String) The ID of the team that owns the schedule

Optional resources:

  • description (String) The description of the schedule

  • enabled (Boolean) Whether the schedule is enabled

  • timezone (String) The timezone of the schedule

Read-only resources:

  • id (String) The ID of the schedule

Example Configuration

resource "atlassian-operations_schedule" "example" { name = "scheduleName" team_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" description = "schedule description" timezone = "Europe/Istanbul" enabled = true }

Schedule rotation resource

Required resources:

  • schedule_id (String) The ID of the schedule

  • start_date (String) The start date of the rotation

  • type (String) The type of the rotation

Optional resources:

  • end_date (String) The end date of the rotation

  • length (Number) The length of the rotation

  • name (String) The name of the rotation

  • participants (Attributes List) The participants of the rotation

    • type (String) The type of the participant

    • id (String) (Optional, if type = “noone”) The ID of the participant

  • time_restriction (Attributes)

    • type (String) The type of the time restriction

    • restriction (Required if type = “time-of-day”) (Attributes)

      • end_hour (Number) The end hour of the restriction

      • end_min (Number) The end minute of the restriction

      • start_hour (Number) The start hour of the restriction

      • start_min (Number) The start minute of the restriction

    • restrictions (Required if type = “weekday-and-time-of-day”) (Attributes List)

      • end_day (String) The end day of the restriction

      • end_hour (Number) The end hour of the restriction

      • end_min (Number) The end minute of the restriction

      • start_day (String) The start day of the restriction

      • start_hour (Number) The start hour of the restriction

      • start_min (Number) The start minute of the restriction

Read-only resources:

  • id (String) The ID of the rotation

Example Configuration

resource "atlassian-operations_schedule_rotation" "example" { schedule_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" name = "rotationName" start_date = "2023-11-10T05:00:00Z" end_date = "2023-11-11T05:00:00Z" type = "weekly" length = 2 participants = [ { id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" type = "user" } ] time_restriction = { type = "time-of-day" restriction = { start_hour = 9 end_hour = 17 start_min = 0 end_min = 0 } } }

Escalation Resource

Required resources:

  • name (String) The name of the escalation

  • rules (Attributes Set) List of the escalation rules.

    • condition (String) The condition for notifying the recipient of escalation rule that is based on the alert state.

    • delay (Number) Time delay of the escalation rule in minutes.

    • notify_type (String) Recipient calculation logic for escalations.

    • recipient (Attributes) Object of schedule, team, or users which will be notified in escalation.

      • type (String) The type of the recipient

      • id (String) The ID of the recipient

  • team_id (String) The ID of the team that owns the escalation

Optional resources:

  • description (String) The description of the escalation

  • enabled (Boolean) Whether the escalation is enabled

  • repeat (Attributes) Repeat preferences of the escalation including repeat interval, count, reverting acknowledge and seen states back and closing an alert automatically as soon as repeats are completed.

    • close_alert_after_all (Boolean) It is to close the alert automatically if escalation repeats are completed.

    • count (Number) Repeat time indicating how many times the repeat action will be performed.

    • reset_recipient_states (Boolean) It is for reverting acknowledge and seen states back on each repeat turn if an alert is not closed.

    • wait_interval (Number) The duration in minutes to repeat the escalation rules after processing the last escalation rule. It is mandatory if you would like to add or remove repeat option. 0 should be given as a value to disable repeat option.

Read-only resources:

  • id (String) The ID of the escalation

Example Configuration

resource "atlassian-operations_escalation" "example" { name = "escalationName" team_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" description = "escalation description" rules = [{ condition = "if-not-acked" notify_type = "default" delay = 5 recipient = { id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" type = "user" } }, { condition = "if-not-closed" notify_type = "all" delay = 1 recipient = { id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" type = "team" } }] enabled = true repeat = { wait_interval = 5 count = 10 reset_recipient_states = true close_alert_after_all = true } }

API integration resource

Required resources:

  • name (String)

  • type (String)

Optional resources:

  • enabled (Boolean)

  • team_id (String)

  • type_specific_properties (JSON String) Integration specific properties may be provided to this object. Use jsonencode to convert the object into a string.

Read-only resources:

  • advanced (Boolean)

  • directions (List of String)

  • domains (List of String)

  • id (String) The ID of the escalation

  • maintenance_sources (Attributes List)

    • enabled (Boolean) Whether the maintenance is enabled

    • interval (Attributes)

      • end_time_millis (Number) The end time of the maintenance

      • start_time_millis (Number) The start time of the maintenance

    • maintenance_id (String) The ID of the maintenance

Default configuration for some integration types

Some API-based integrations require the type_specific_properties field to be explicitly defined in your Terraform configuration. If omitted or partially defined, Terraform may detect a mismatch with the API response and throw a conflict error during terraform apply.

To avoid this, we recommend specifying the full type_specific_properties block—even if the values match defaults. This ensures your configuration stays in sync with the actual integration state.

  • API integration (Incoming-API)

type_specific_properties = jsonencode({ deleteAccessGranted: true, writeAccessGranted: true, restrictConfigAccess: true, readAccessGranted: true, isDefaultIntegration: false, suppressNotifications: false })
  • Prometheus (Incoming-API)

type_specific_properties = jsonencode({ deleteAccessGranted: true, writeAccessGranted: true, restrictConfigAccess: true, readAccessGranted: true, suppressNotifications: false })
  • Webhook (Incoming-API)

type_specific_properties = jsonencode({ addAlertDetails: true, headers: { "TestHeader": "TestHeaderValue" }, addAlertDescription: true, outgoingSettingsEnabled: true, forwardingActionGroupEnabled: true, url: "https://test.webhook.com" })
  • Splunk (Incoming-API)

type_specific_properties = jsonencode({ sendViaJEC: true, writeAccessGranted: true, restrictConfigAccess: true, updatingActionGroupEnabled: false, outgoingSettingsEnabled: true, suppressNotifications: false, deleteAccessGranted: true, forwardingActionGroupEnabled: true, readAccessGranted: true, url: "test.splunk.url", token: "test.splunk.token" })


Example configuration

resource "atlassian-operations_api_integration" "example" { name = "apiIntegrationName" team_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" type = "API" enabled = true type_specific_properties = jsonencode({ suppressNotifications: false }) }

Email integration resource

Required resources:

  • name (String)

  • type_specific_properties (Attributes) Integration specific properties may be provided to this object.

    • email_username (String)

    • suppress_notifications (Optional, defaults to false) (Boolean)

Optional resources:

  • enabled (Boolean)

  • team_id (String)

Read-only resources:

  • advanced (Boolean)

  • directions (List of String) Direction of the action. It can be incoming or outgoing

  • domains (List of String) Domain of the action. It can be alert

  • id (String) The ID of the escalation

  • maintenance_sources (Attributes List)

    • enabled (Boolean)

    • interval (Attributes)

      • end_time_millis (Number)

      • start_time_millis (Number)

    • maintenance_id (String)

Default configuration for some email integration types

To avoid Terraform plan or apply errors, you may need to explicitly define the type_specific_properties field. Without it, Terraform can detect mismatches between your config and the API response, leading to state conflicts.

We recommend including the full type_specific_properties block for known email integration types. This keeps your configuration stable and prevents unexpected diffs.

  • Email integration (Incoming)

type_specific_properties = jsonencode({ emailAddress: "<your-generated-email-address>", emailUsername: "<your-email-username>", isEmailDomainSyncRequired: false, suppressNotifications: false })
  • ConnectWiseAutomate (Email - Incoming)

type_specific_properties = jsonencode({ emailAddress: "<your-generated-email-address>", emailUsername: "<your-email-username>", isEmailDomainSyncRequired: false, suppressNotifications: false })


Example configuration

resource "atlassian-operations_email_integration" "example" { name = "emailIntegrationUpdateName" team_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" enabled = true type_specific_properties = { email_username = "randomEmailUsername" suppress_notifications = false } }


Notification rules

Required resources:

  • name (String) –The name of the notification rule. Must be unique within the team.

  • action_type (String) – The type of action that triggers the rule. Valid values:

    • create-alert

    • acknowledged-alert

    • closed-alert

    • assigned-alert

    • add-note

    • schedule-start

    • schedule-end

    • incoming-call-routing

Optional resources:

  • criteria (Object) – Defines when the notification rule should be triggered. Includes:

    • type (String) – Required. Defines the match logic for conditions. Valid values:

      • match-all: Matches all incidents. No conditions needed.

      • match-all-conditions: All conditions must match.

      • match-any-condition: Any condition can match.

    • conditions (List of Objects) – Required if type is match-all-conditions or match-any-condition. Each object may include:

      • field (String) – Required. The incident field to evaluate (e.g., message, priority, tags).

      • operation (String) – Required. The comparison operator (e.g., equals, contains).

      • expected_value (String) – Optional. The value to compare against.

      • key (String) – Optional. Used with extra-properties fields.

      • not (Boolean) – Optional. Negates the condition.

      • order (Integer) – Optional. Determines the order of evaluation.

  • notification_time (List of String) – Specifies when to send notifications relative to the event. Valid values: just-before, 15-minutes-ago, 1-hour-ago, 1-day-ago.

  • time_restriction (Attributes)

    • type (String) The type of the time restriction

    • restriction (Required if type = “time-of-day”) (Attributes)

      • end_hour (Number) - The end hour of the restriction

      • end_min (Number) - The end minute of the restriction

      • start_hour (Number) - The start hour of the restriction

      • start_min (Number) - The start minute of the restriction

    • restrictions (Required if type = “weekday-and-time-of-day”) (Attributes List)

      • end_day (String) - The end day of the restriction

      • end_hour (Number) - The end hour of the restriction

      • end_min (Number) - The end minute of the restriction

      • start_day (String) - The start day of the restriction

      • start_hour (Number) - The start hour of the restriction

      • start_min (Number) - The start minute of the restriction

  • schedules (List of String) – Schedule IDs the rule applies to.

  • order (Integer) – The rule's processing order (lower numbers run first)

steps (List of Objects) – Defines notification steps. Each step may include:

  • send_after (Integer) – Optional. Delay (in minutes) after rule trigger

  • contact (Object) – Required. Defines who to notify:

    • method (String) – Required. Notification method (email, sms, voice, mobile)

    • to (String) – Required. Recipient (email address or phone number)

  • repeat (Object) – Configuration for repeating notifications:

    • loop_after (Integer) – Required. Delay (in minutes) before repeating

    • enabled (Boolean) – Optional. Whether repetition is active (defaults to true)

  • enabled (Boolean) – Whether the rule is active. Defaults to true.

Read-only resources:

id (String) – The unique identifier of the notification rule.

Example configuration

This example:

  • Triggers on create-alert events.

  • Uses match-all-conditions to match on both priority and tags.

  • Notifies via SMS immediately and email after 5 minutes.

  • Repeats every 10 minutes if the alert is not acknowledged or closed.

  • Applies only during working hours (9am–6pm).

 

resource "atlassian-operations_notification_rule" "example" { name = "High Priority Alert Notification" action_type = "create-alert" enabled = true order = 1 criteria = { type = "match-all-conditions" conditions = [ { field = "priority" operation = "equals" expected_value = "P1" }, { field = "tags" operation = "contains" expected_value = "infrastructure" } ] } notification_time = [ "just-before", "15-minutes-ago" ] time_restriction = { type = "time-of-day" restriction = { start_hour = 9 start_min = 0 end_hour = 18 end_min = 0 } } schedules = [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ] steps = [ { send_after = 0 contact = { method = "sms" to = "+15551234567" } }, { send_after = 5 contact = { method = "email" to = "[email protected]" } } ] repeat = { loop_after = 10 enabled = true } }

Routing rules

Required resources:

  • team_id (String) – The ID of the team that owns this routing rule. This value can’t be changed after creation.

  • notify (Object) – Defines how incidents matching this rule should be routed. Includes:

    • type (String) – Required. Notification method:

      • none – No routing

      • escalation – Use an escalation policy

      • schedule – Use a schedule

    • id (String) – Required if type is escalation or schedule. The ID of the target escalation or schedule.

Optional resources:

  • name (String) – A descriptive name for the routing rule. Defaults to an empty string.

  • order (Integer) – Index of this rule among all team routing rules. Must be between 0 and 100.

  • is_default (Boolean) – Whether this is the default routing rule. If enabled, this rule is used when no other rules match.

  • timezone (String) – The timezone for time-based decisions (e.g. Europe/London). Must be a valid IANA timezone.

  • criteria (Object) – Defines when the rule should be triggered.
    If provided, includes:

    • type (String) – Required inside criteria. Valid values:

      • match-all: No conditions required

      • match-all-conditions: All conditions must match

      • match-any-condition: At least one condition must match

    • conditions (List of Objects) – Required only if type is match-all-conditions or match-any-condition.
      Each object may include:

      • field (String) – Required. The incident field to evaluate (e.g. message, priority)

      • operation (String) – Required. The comparison operation (e.g. equals, contains)

      • expected_value (String) – Optional. Value to compare against

      • key (String) – Optional. Used for key-value matching when field is extra-properties

      • not (Boolean) – Optional. Negates the condition

      • order (Integer) – Optional. Order of the conditions in the list

  • time_restriction (Attributes)

    • type (String) The type of the time restriction

    • restriction (Required if type = “time-of-day”) (Attributes)

      • end_hour (Number) The end hour of the restriction

      • end_min (Number) The end minute of the restriction

      • start_hour (Number) The start hour of the restriction

      • start_min (Number) The start minute of the restriction

    • restrictions (Required if type = “weekday-and-time-of-day”) (Attributes List)

      • end_day (String) The end day of the restriction

      • end_hour (Number) The end hour of the restriction

      • end_min (Number) The end minute of the restriction

      • start_day (String) The start day of the restriction

      • start_hour (Number) The start hour of the restriction

      • start_min (Number) The start minute of the restriction

Read-only resources:

  • id (String) – The unique identifier of the routing rule, generated automatically.

Example configuration

This example:

  • Routes high-priority incidents tagged with customer-impact

  • Only applies between 8:30 and 17:45 (London time)

  • Notifies through an escalation policy

  • Is not the default routing rule and is set to process first (order = 0)

 

resource "atlassian-operations_routing_rule" "high_priority_routing" { team_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" name = "High Priority Incidents" order = 0 timezone = "Europe/London" is_default = false criteria = { type = "match-all-conditions" conditions = [ { field = "priority" operation = "equals" expected_value = "P1" }, { field = "tags" operation = "contains" expected_value = "customer-impact" } ] } time_restriction = { type = "time-of-day" restriction = { start_hour = 8 start_min = 30 end_hour = 17 end_min = 45 } } notify = { type = "escalation" id = "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" } }

Alert policies resource

Required resources

  • enabled (Boolean) – Whether the alert policy is active.

  • message (String) – Template for the alert message.

  • name (String) – The name of the alert policy.

  • type (String) – Must be set to alert.

Optional resources

  • actions (List of String) – List of actions to associate with the alert.

  • alert_description (String) – Template for the alert description.

  • alias (String) – Template for the alert alias.

  • continue (Boolean) – Whether to continue processing other policies after this one.

  • description (String) – Description of the alert policy.

  • details (Map of String) – Additional detail key-value pairs to include in the alert.

  • entity (String) – Template for the alert entity.

  • filter (Object) – Criteria that control when this policy is applied. Includes:

    • type (String) – Required. Type of the filter.

    • conditions (List of Objects) – Required. Each condition includes:

      • expected_value (String) – Required. Value to compare against.

      • field (String) – Required. Alert field to evaluate.

      • operation (String) – Required. Comparison operation.

      • key (String) – Optional. Key to filter when using key-value fields.

      • not (Boolean) – Optional. Whether to negate the condition.

      • order (Number) – Optional. Processing order of the condition.

  • keep_original_actions (Boolean) – Whether to retain existing alert actions.

  • keep_original_details (Boolean) – Whether to retain existing alert details.

  • keep_original_responders (Boolean) – Whether to retain existing alert responders.

  • keep_original_tags (Boolean) – Whether to retain existing alert tags.

  • order (Number) – The order in which the policy is evaluated.

  • priority_value (String) – The priority value to assign if update_priority is enabled.

  • responders (List of Objects) – Specifies who will be notified. Each responder includes:

    • type (String) – Required. Type of the responder.

    • id (String) – Optional. ID of the responder (user, team, or schedule).

  • source (String) – Template for the alert source.

  • tags (List of String) – Tags to associate with the alert.

  • team_id (String) – ID of the team that owns the alert policy.

  • time_restriction (Object) – Defines when this policy is active. Includes:

    • enabled (Boolean) – Required. Whether time-based restrictions are enabled.

    • time_restrictions (List of Objects) – Required. Each period includes:

      • start_hour (Number) – Required. Start hour.

      • start_minute (Number) – Required. Start minute.

      • end_hour (Number) – Required. End hour.

      • end_minute (Number) – Required. End minute.

  • update_priority (Boolean) – Whether to change the alert priority when this policy applies.

Read-only resources

  • id (String) – Unique identifier for the alert policy, assigned automatically.

Example configuration

resource "atlassian-operations_alert_policy" "example" { name = "High CPU Alert Policy" type = "alert" enabled = true message = "High CPU usage detected on ${host}" alert_description = "CPU usage exceeded 90% on ${host}" source = "monitoring-system" priority_value = "P1" update_priority = true continue = true team_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" order = 1 actions = ["Restart Service", "Notify Ops Team"] tags = ["infrastructure", "cpu"] alias = "cpu-alert-${host}" responders = [ { type = "team" id = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" } ] details = { metric = "cpu.utilization" threshold = "90" } filter = { type = "match-all-conditions" conditions = [ { field = "message" operation = "contains" expected_value = "CPU usage" }, { field = "priority" operation = "equals" expected_value = "P1" } ] } time_restriction = { enabled = true time_restrictions = [ { start_hour = 9 start_minute = 0 end_hour = 18 end_minute = 0 } ] } }

Custom roles resource

Required resources

  • name (String) – The name of the custom role.

Optional resources

  • disallowed_rights (Set of String) – Permissions explicitly denied to the custom role. List must be alphabetically sorted.

  • granted_rights (Set of String) – Permissions explicitly granted to the custom role. List must be alphabetically sorted.

Read-only resources

  • id (String) – Unique identifier for the custom role, assigned automatically.

Example configuration

resource "atlassian-operations_custom_role" "incident_responder" { name = "Incident Responder" granted_rights = [ "acknowledge-alert", "close-alert", "view-alert" ] disallowed_rights = [ "delete-team", "manage-schedule" ] }

User contact resource

Required resources

  • method (String) – The delivery method for the contact. Valid values typically include emailsmsvoice, or mobile.

  • to (String) – The destination for the contact (e.g. email address or phone number).

Optional resources

  • enabled (Boolean) – Whether this contact method is active. Defaults to true.

Read-only resources

  • id (String) – Unique identifier for the user contact resource, assigned automatically.

Example configuration

resource "atlassian-operations_user_contact" "sms_contact" { method = "sms" to = "+15551234567" enabled = true }

Notification policies resource

Use the notification policy resource to define advanced controls for alert notifications, including suppression, delays, auto-close, deduplication, and more. Notification policies apply at the team level and run based on filtering and time restrictions.

Required resources

  • enabled (Boolean) – Whether the notification policy is active.

  • name (String) – The name of the notification policy.

  • team_id (String) – The ID of the team this notification policy belongs to.

  • type (String) – Must be set to notification.

Optional resources

  • description (String) – A short description of the policy.

  • order (Number) – The order of evaluation for the policy.

  • suppress (Boolean) – Whether to suppress notifications for alerts that match this policy.

auto_close_action (Object) – Automatically close alerts after a specified delay.
  • duration_format (String) – Unit for the wait duration. Valid values: nanos, micros, millis, seconds, minutes, hours, days.

  • wait_duration (Number) – How long to wait before closing the alert.

auto_restart_action (Object) – Automatically restart alerts.
  • max_repeat_count (Number, required) – Number of times to repeat (between 1 and 20).

  • duration_format (String) – Unit for wait duration. Valid values: nanos, micros, millis, seconds, minutes, hours, days.

  • wait_duration (Number) – Delay before repeating.

deduplication_action (Object) – Deduplicates similar alerts to avoid noise.
  • deduplication_action_type (String, required) – The deduplication strategy.

  • count_value_limit (Number) – Number of alerts before deduplication is triggered.

  • frequency (Number) – Deduplication window duration (in seconds).

  • duration_format (String) – Time unit for wait.

  • wait_duration (Number) – Delay before applying deduplication.

delay_action (Object) – Delays alert notifications.
  • delay_option (String, required) – Strategy for delaying alerts.

  • delay_time (Object, required) – How long to delay:

    • hours (Number) – Hours to delay

    • minutes (Number) – Minutes to delay

  • duration_format (String) – Unit for delay

  • wait_duration (Number) – Total delay before sending notification

filter (Object) – Defines when the policy should apply.
  • type (String, required) – The filter type

  • conditions (List of Objects, required) – Filter logic:

    • field (String) – Required

    • operation (String) – Required

    • expected_value (String) – Required

    • key (String) – Optional

    • not (Boolean) – Optional (Defaults to False)

    • order (Number) – Optional

time_restriction (Object) – Restrict when the policy is active.
  • enabled (Boolean, required) – Whether time restrictions are enabled

  • time_restrictions (List of Objects, required) – Each object includes:

    • start_hour (Number) – Required

    • start_minute (Number) – Required

    • end_hour (Number) – Required

    • end_minute (Number) – Required

Read-only resources

  • id (String) – Unique identifier for the notification policy

Example configuration

This example defines:

  • A notification policy named business_hours_suppressor

  • Suppresses low-priority (P4) alerts

  • Applies only during working hours (9:00 to 17:00)

  • Uses a filter with match-all-conditions on the priority field

 

resource "atlassian-operations_notification_policy" "business_hours_suppressor" { name = "Suppress low-priority alerts during business hours" type = "notification" enabled = true team_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" order = 0 suppress = true description = "Suppress low-priority alerts during working hours" filter = { type = "match-all-conditions" conditions = [ { field = "priority" not = false operation = "equals" expected_value = "P4" order = 1 } ] } time_restriction = { enabled = true time_restrictions = [ { start_hour = 9 start_minute = 0 end_hour = 17 end_minute = 0 } ] } }

Heartbeats resource

Use the heartbeat resource to monitor time-based signals from external systems. If a heartbeat is not received within the defined interval, an alert is automatically triggered.

Required resources

  • name (String) – The unique name of the heartbeat. Cannot be changed after creation.

  • interval (Number) – The duration between expected heartbeat signals.

  • interval_unit (String) – The time unit for the interval. Valid values: minutes, hours, days.

  • team_id (String) – The ID of the team that owns the heartbeat.

Optional resources

  • description (String) – Description of the heartbeat's purpose.

  • alert_message (String) – Message shown when a heartbeat is missed.

  • alert_priority (String) – Priority of the alert triggered (P1, P2, etc.).

  • alert_tags (Set of String) – Tags to include with the triggered alert.

  • enabled (Boolean) – Whether the heartbeat is active. Defaults to true.

Read-only resources

  • status (String) – Current status of the heartbeat.

Example configuration

This configuration:

  • Creates a 15-minute interval heartbeat

  • Alerts if the signal is missed

  • Tags the alert and gives it a P2 priority

  • Provides a helpful message for responders

 

resource "atlassian-operations_heartbeat" "external_cron_check" { name = "External Cron Job Monitor" interval = 15 interval_unit = "minutes" team_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" description = "Checks whether the external cron job is still running" enabled = true alert_message = "Cron job missed its scheduled run" alert_priority = "P2" alert_tags = [ "monitoring", "cron", "external-system" ] }

Integration action resource

Required resources

  • direction (String) – The direction of the integration action. Must be either incoming or outgoing.

  • domain (String) – The domain in which the integration action operates.

  • integration_id (String) – The ID of the integration this action belongs to.

  • name (String) – The name of the integration action.

  • type (String) – The type of the integration action.

Optional resources

  • enabled (Boolean) – Whether the integration action is enabled.

  • group_type (String) – The group type for organizing integration actions. The group type can only be one of forwarding, updating, checkbox.

  • field_mappings (String) – Field mappings used in the integration action.

  • type_specific_properties (String) – Type-specific configuration as a raw string.

action_mapping (Object) – Defines how this action maps to another.
  • type (String) – Required. The type of action mapping.

  • parameter (String) – Optional. Additional parameters for the action mapping.

filter (Object) – Controls when this integration action is triggered.
  • condition_match_type (String) – Required. The condition match logic to apply (e.g., match-all ,match-any-condition,match-all-conditions.

  • conditions_empty (Boolean) – Required. Whether the conditions list is empty.

  • conditions (List of Objects) – Optional. Conditions used to evaluate the event. Each condition may include:

    • field (String) – Required. The incident field to evaluate (e.g., message, priority, tags).

    • operation (String) – Required. The comparison operation to apply (e.g., equals, contains, starts-with).

    • expected_value (String) – Optional. Value to compare against.

    • key (String) – Optional. Used for key-value pairs with extra-properties.

    • not (Boolean) – Optional. Negates the condition.

    • order (Number) – Optional. Evaluation order of the condition.

    • system_condition (Boolean) – Optional. Whether the condition is system-defined.

Read-only resources

  • id (String) – The unique identifier of the integration action.

Default configuration for some integration actions

Some integration actions require the type_specific_properties and field_mappings fields to be explicitly defined in your Terraform configuration. If these values are missing or incomplete, Terraform may detect differences between your configuration and the API response, resulting in a conflict error during terraform apply.

To avoid this, we recommend including both type_specific_properties and field_mappings with complete values even if they reflect default behavior. This ensures your configuration stays aligned with the actual integration action state.

  • API integration (Incoming API)

type_specific_properties = jsonencode({ keepRespondersFromPayload: false, appendAttachments: true, keepTagsFromPayload: true, keepActionsFromPayload: true, keepExtraPropertiesFromPayload: true }) field_mappings = jsonencode({ note: "{{note}}", description: "{{description}}", source: "{{source}}", message: "{{message}}", priority: "{{priority}}", responders: [ { "type": "team", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" } ], tags: [], alias: "{{alias}}", details: {}, user: "{{user}}", actions: [], entity: "{{entity}}" })
  • Prometheus integration (Incoming-API)

type_specific_properties = jsonencode({ keepRespondersFromPayload: false, appendAttachments: true, keepTagsFromPayload: true, keepActionsFromPayload: true, keepExtraPropertiesFromPayload: true }) field_mappings = jsonencode({ note: "{{note}}", description: "{{description}}", source: "{{source}}", message: "[Prometheus]: {{message}}", priority: "{{priority}}", responders: [ { "type": "team", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" } ], tags: [], alias: "{{alias}}", details: {}, user: "{{user}}", actions: [], entity: "{{entity}}" })
  • Webhook integration (Outgoing)

direction = "outgoing" action_mapping = { type= "acknowledge" } group_type = "forwarding",
  • Splunk integration (Bidirectional - API and Jira Edge Connector)

    • Action type: create

    • type_specific_properties = jsonencode({ keepRespondersFromPayload: false, appendAttachments: true, keepTagsFromPayload: false, keepActionsFromPayload: false, keepExtraPropertiesFromPayload: false }) field_mappings = jsonencode({ note: "", description: "Sid:{{sid}}\nSource Type:{{source_type}}\nSplunk Server:{{splunk_server}}\nServer Host:{{server_host}}\nIndex:{{index}}", source: "Splunk", message: "[Splunk] {{search_name}} has {{linecount}} lines.", priority: "{{priority}}", responders: [ { "type": "team", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" } ], tags: [], alias: "", details: { "Raw": "{{raw}}", "Results Link": "{{results_link}}" }, user: "Splunk", actions: [], entity: "" })
    • Action type: createEvent

    • direction = "outgoing" action_mapping = { type= "create" } group_type = "forwarding",
  • Email integration (Incoming)

type_specific_properties = jsonencode({ keepRespondersFromPayload: false, appendAttachments: true, keepTagsFromPayload: false, keepActionsFromPayload: false, keepExtraPropertiesFromPayload: false })
  • ConnectWiseAutomate (Incoming - Email)

type_specific_properties = jsonencode({ "keepRespondersFromPayload": false, "appendAttachments": true, "keepTagsFromPayload": false, "keepActionsFromPayload": false, "keepExtraPropertiesFromPayload": false } field_mappings = jsonencode({ note: "", description: "Client Name : {{clientName}}\nComputer Name : {{computerName}}\nLocation Name : {{locationName}}\nField Name : {{fieldName}}\nResult : {{result}}\nFail Count : {{failCount}}\nWhen : {{when}}\nContact Name : {{contactName}}", source: "ConnectWise Automate", message: "[CW Automate] {{monitorName}} is {{monitorStatus}}", priority: "{{priority}}", responders: [ { "type": "team", "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" } ], tags: [], alias: "{{monitorName}}{{computerName}}", details: { "From": "{{from_address}}" }, user: "", actions: [], entity: "" })

Example configuration

This example:

  • Sets up an incoming action triggered by critical alerts

  • Uses match-all-conditions condition logic to apply filters on priority and message

  • Automatically acknowledges matching alerts

  • Applies field mappings and a static action mapping

 

resource "atlassian-operations_integration_action" "auto_acknowledge_critical" { name = "Auto-acknowledge Critical Alerts" type = "acknowledge-alert" direction = "incoming" domain = "alert" integration_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" enabled = true group_type = "default" field_mappings = jsonencode({ "priority": "{{alert.priority}}" }) type_specific_properties = jsonencode({ "customSetting": true }) action_mapping = { type = "static" parameter = "auto" } filter = { condition_match_type = "match-all-conditions" conditions_empty = false conditions = [ { field = "priority" operation = "equals" expected_value = "P1" order = 0 }, { field = "message" operation = "contains" expected_value = "CRITICAL" not = false system_condition = false order = 1 } ] } }

Maintenance resource

Required resources

  • start_date (String) – Start of the maintenance window in ISO 8601 format (e.g. 2023-06-15T10:00:00Z).

  • end_date (String) – End of the maintenance window in ISO 8601 format (e.g. 2023-06-15T14:00:00Z).

  • rules (List of Objects) – Entities affected by the maintenance window. Each rule must include:

    • entity (Object):

      • id (String) – The unique ID of the entity (e.g. integration ID or policy ID).

      • type (String) – The type of entity. Valid values include integration, policy, or sync.

    • state (String) – The state to apply during maintenance. Valid values: disabled, enabled, noMaintenance.

Optional resources

  • description (String) – A description of the maintenance window.

  • team_id (String) – ID of the team associated with this maintenance window.

Read-only resources

  • id (String) – Unique identifier for the maintenance window.

  • status (String) – Current status of the maintenance window. Possible values: scheduled, in_progress, completed, cancelled.

Example configuration

This example:

  • Sets a 6-hour maintenance window

  • Disables one integration and applies noMaintenance mode to a policy

  • Associates the window with a team and includes a description

 

resource "atlassian-operations_maintenance" "api_upgrade_window" { start_date = "2025-07-01T22:00:00Z" end_date = "2025-07-02T04:00:00Z" description = "Planned API gateway upgrade and re-deploy" team_id = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" rules = [ { entity = { id = "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb" type = "integration" } state = "disabled" }, { entity = { id = "cccccccc-cccc-cccc-cccc-cccccccccccc" type = "policy" } state = "noMaintenance" } ] }

Still need help?

The Atlassian Community is here for you.
OSZAR »