Atlassian Operations Terraform プロバイダーを設定する
Atlassian Operations Terraform プロバイダーを使用すると、ユーザー、チーム、エスカレーションなどを含む Jira Service Management のリソースを操作できます。宣言型構成ファイルでリソースを定義することで、IT 運用の構成を簡単にコーディング、編集、レビュー、バージョン管理できます。
GitHub の Atlassian Operations Terraform プロバイダーのリポジトリをご覧ください。
サポートされているリソースとデータソース
このプロバイダーは、Terraform を介して次のリソースとデータソースの作成および管理をサポートします。
データソース (読み取り専用)
ユーザー (ユーザー連絡先 API を除く)
チーム
スケジュール
リソース (読み取り/書き込み - CRUD)
Teams (with or without members)
Terraform はチーム管理者を更新できない
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.
Terraform プロバイダーを設定する
Atlassian Operations Terraform プロバイダーを設定するには、Terraform 設定の required_providers ブロックに atlassian-operations を含めます。プロバイダーを使用する前に、有効な認証情報を使用してプロバイダーを設定してください。
必須の設定パラメーター
プロバイダーには次のパラメーターが必要です。
cloud_id: サイトのクラウド ID を確認する最も簡単な方法はhttps://<your-site-name>.atlassian.net/_edge/tenant_infoを使うことです。domain_name- サイトの URL (例:my-site-name.atlassian.net)email_addresstoken- You can list your existing Atlassian API tokens or create new ones by managing API token for your Atlassian account.
設定例
以下は Terraform の設定例です。
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@example.com"
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
ユーザー データソース
ユーザーを取得するには、email address を指定する必要があります。
# Get Atlassian User by email address
data "atlassian-operations_user" "example" {
email_address = "email@example.com"
}チーム データソース
チームを取得するには、team id と organization id の両方が必要です。
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"
}スケジュール データソース
スケジュールを取得するには、その name を指定する必要があります。
# Get Atlassian Operations Schedule by name
data "atlassian-operations_schedule" "example" {
name = "Test schedule"
}Using resources
Team resource
必須のリソース:
description(文字列) チームの説明display_name(文字列) チームの表示名member(属性セット) チームのメンバーaccount_id(文字列) ユーザーのアカウント ID
organization_id(文字列) チームの組織 IDteam_type(文字列) チームのタイプ
オプションのリソース:
site_id(文字列) チームのサイト ID
読み取り専用のリソース:
id (String)チームの IDuser_permissions(属性) チームのユーザー権限add_members(ブール値) チームにメンバーを追加する権限delete_team(ブール値) チームを削除する権限remove_members(ブール値) チームからメンバーを削除する権限update_team(ブール値) チームを更新する権限
To find the Organization ID view what is Organization ID an where to find it.
設定例
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
必須のリソース:
name(文字列) スケジュールの名前team_id(文字列) スケジュールを所有するチームの ID
オプションのリソース:
description(文字列) スケジュールの説明enabled(ブール値) スケジュールが有効かどうかtimezone(文字列) スケジュールのタイム ゾーン
読み取り専用のリソース:
id(文字列) スケジュールの ID
設定例
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(文字列) スケジュールの IDstart_date(文字列) ローテーションの開始日type(文字列) ローテーションのタイプ
オプションのリソース:
end_date(文字列) ローテーションの終了日length(数値) ローテーションの長さname(文字列) ローテーションの名前participants(属性リスト) ローテーションの参加者type(文字列) 参加者のタイプid(文字列) (タイプが「noone」の場合はオプション) 参加者の ID
time_restriction(属性)type(文字列) 時間制限のタイプrestriction(タイプが「time-of-day」の場合は必須) (属性)end_hour(数値) 制限の終了時間 (時)end_min(数値) 制限の終了時間 (分)start_hour(数値) 制限の開始時間 (時)start_min(数値) 制限の開始時間 (分)
restrictions(タイプが「weekday-and-time-of-day」の場合は必須) (属性リスト)end_day(文字列) 制限の終了日end_hour(数値) 制限の終了時間 (時)end_min(数値) 制限の終了時間 (分)start_day(文字列) 制限の開始日start_hour(数値) 制限の開始時間 (時)start_min(数値) 制限の開始時間 (分)
読み取り専用のリソース:
id(文字列) ローテーションの ID
設定例
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
}
}
}エスカレーション リソース
必須のリソース:
name(文字列) エスカレーションの名前rules(属性セット) エスカレーション ルールのリストcondition(文字列) アラートの状態に基づきエスカレーション ルールについて受信者に通知するための条件delay(数値) エスカレーション・ルールの遅延時間 (分)notify_type(文字列) エスカレーションの受信者計算ロジックrecipient(属性) エスカレーション時に通知されるスケジュール、チーム、ユーザーのオブジェクトtype(文字列) 受信者のタイプid(文字列) 受信者の ID
team_id(文字列) エスカレーションを所有するチームの ID
オプションのリソース:
description(文字列) エスカレーションの説明enabled(ブール値) エスカレーションが有効かどうかrepeat(属性) エスカレーションの繰り返しに関する設定 (繰り返し間隔、回数、確認済みおよび表示済み状態を元に戻す、繰り返しが完了した時点でアラートを自動的に閉じる、など)close_alert_after_all(ブール値) エスカレーションの繰り返しが完了したら自動的にアラートを閉じるcount(数値) 繰り返しのアクションを実行する回数を示す繰り返し時間reset_recipient_states(ブール値) アラートが閉じられていない場合、繰り返しのたびに確認済みおよび表示済みの状態を元に戻すwait_interval(数値) 最後のエスカレーション ルールの処理後にエスカレーション ルールを繰り返す時間 (分)。繰り返しオプションを追加または削除する場合は必須。繰り返しオプションを無効にするには、値として 0 を指定する。
読み取り専用のリソース:
id(文字列) エスカレーションの ID
設定例
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
必須のリソース:
name(文字列)type(文字列)
オプションのリソース:
enabled(ブール値)team_id(文字列)type_specific_properties(JSON 文字列) このオブジェクトには、統合固有のプロパティを指定可能jsonencodeを使ってオブジェクトを文字列に変換します。
読み取り専用のリソース:
advanced(ブール値)directions(文字列のリスト)domains(文字列のリスト)id(文字列) エスカレーションの IDmaintenance_sources(属性リスト)enabled(ブール値) メンテナンスが有効かどうかinterval(属性)end_time_millis(数値) メンテナンスの終了時間start_time_millis(数値) メンテナンスの開始時間
maintenance_id(文字列) メンテナンスの ID
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"
})
設定例
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
必須のリソース:
name(文字列)type_specific_properties(属性) このオブジェクトには、統合固有のプロパティを指定可能email_username(文字列)suppress_notifications(任意、デフォルトはfalse) (ブール値)
オプションのリソース:
enabled(ブール値)team_id(文字列)
読み取り専用のリソース:
advanced(ブール値)directions(文字列のリスト) アクションの方向 (着信または発信)domains(文字列のリスト) アクションのドメイン (アラート)id(文字列) エスカレーションの IDmaintenance_sources(属性リスト)enabled(ブール値)interval(属性)end_time_millis(数値)start_time_millis(数値)
maintenance_id(文字列)
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
})
設定例
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
}
}
通知ルール
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-alertacknowledged-alertclosed-alertassigned-alertadd-noteschedule-startschedule-endincoming-call-routing
オプションのリソース:
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. Noconditionsneeded.match-all-conditions: All conditions must match.match-any-condition: Any condition can match.
conditions(List of Objects) – Required iftypeismatch-all-conditionsormatch-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 withextra-propertiesfields.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 restrictionrestriction(Required if type = “time-of-day”) (Attributes)end_hour(Number) - The end hour of the restrictionend_min(Number) - The end minute of the restrictionstart_hour(Number) - The start hour of the restrictionstart_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 restrictionend_hour(Number) - The end hour of the restrictionend_min(Number) - The end minute of the restrictionstart_day(String) - The start day of the restrictionstart_hour(Number) - The start hour of the restrictionstart_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 triggercontact(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 repeatingenabled(Boolean) – Optional. Whether repetition is active (defaults to true)
enabled(Boolean) – Whether the rule is active. Defaults totrue.
読み取り専用のリソース:
id (String) – The unique identifier of the notification rule.
設定例
This example:
Triggers on
create-alertevents.Uses
match-all-conditionsto 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 = "oncall@example.com"
}
}
]
repeat = {
loop_after = 10
enabled = true
}
}
ルーティングルール
必須のリソース:
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 routingescalation– Use an escalation policyschedule– Use a schedule
id(String) – Required if type is escalation or schedule. The ID of the target escalation or schedule.
オプションのリソース:
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 requiredmatch-all-conditions: All conditions must matchmatch-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 againstkey(String) – Optional. Used for key-value matching when field is extra-propertiesnot(Boolean) – Optional. Negates the conditionorder(Integer) – Optional. Order of the conditions in the list
time_restriction(Attributes)type(String) The type of the time restrictionrestriction(Required if type = “time-of-day”) (Attributes)end_hour(Number) The end hour of the restrictionend_min(Number) The end minute of the restrictionstart_hour(Number) The start hour of the restrictionstart_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 restrictionend_hour(Number) The end hour of the restrictionend_min(Number) The end minute of the restrictionstart_day(String) The start day of the restrictionstart_hour(Number) The start hour of the restrictionstart_min(Number) The start minute of the restriction
読み取り専用のリソース:
id(String) – The unique identifier of the routing rule, generated automatically.
設定例
This example:
Routes high-priority incidents tagged with
customer-impactOnly 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 toalert.
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 ifupdate_priorityis 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.
設定例
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.
設定例
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 includeemail,sms,voice, ormobile.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 totrue.
Read-only resources
id(String) – Unique identifier for the user contact resource, assigned automatically.
設定例
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 tonotification.
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 delayminutes(Number) – Minutes to delay
duration_format(String) – Unit for delaywait_duration(Number) – Total delay before sending notification
filter (Object) – Defines when the policy should apply.
type(String, required) – The filter typeconditions(List of Objects, required) – Filter logic:field(String) – Requiredoperation(String) – Requiredexpected_value(String) – Requiredkey(String) – Optionalnot(Boolean) – Optional (Defaults toFalse)order(Number) – Optional
time_restriction (Object) – Restrict when the policy is active.
enabled(Boolean, required) – Whether time restrictions are enabledtime_restrictions(List of Objects, required) – Each object includes:start_hour(Number) – Requiredstart_minute(Number) – Requiredend_hour(Number) – Requiredend_minute(Number) – Required
Read-only resources
id(String) – Unique identifier for the notification policy
設定例
This example defines:
A notification policy named
business_hours_suppressorSuppresses low-priority (
P4) alertsApplies only during working hours (9:00 to 17:00)
Uses a filter with
match-all-conditionson thepriorityfield
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 totrue.
Read-only resources
status(String) – Current status of the heartbeat.
設定例
This configuration:
Creates a 15-minute interval heartbeat
Alerts if the signal is missed
Tags the alert and gives it a
P2priorityProvides 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 eitherincomingoroutgoing.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 offorwarding,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 withextra-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:
createtype_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:
createEventdirection = "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: ""
})設定例
This example:
Sets up an incoming action triggered by critical alerts
Uses
match-all-conditionscondition logic to apply filters onpriorityandmessageAutomatically 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 includeintegration,policy, orsync.
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.
設定例
This example:
Sets a 6-hour maintenance window
Disables one integration and applies
noMaintenancemode to a policyAssociates 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"
}
]
}
Services resource
Manages a Jira Service Management service. Services represent systems, platforms, or infrastructure that provide value to your business or customers.
Required resources
description(String) – The description of the JSM service.name(String) – The name of the JSM service.owner(String) – The team ID that owns the JSM service. Set to an empty string to remove the owner.tier(Number) – The tier level of the JSM service.type(String) – The type of the JSM service.
Optional resources
change_approvers(Attributes) – Configuration for change approvers.groups(List of String) – Group IDs for change approvers. Set to an empty list to remove all group change approvers. Fetch the group IDs with REST API.
projects(Attributes) – Associated projects.ids(List of String) – Project IDs. Set to an empty list to remove all projects.
responders(Attributes) – Responders for the service.teams(List of String) – Team IDs for responders. Set to an empty list to remove all team responders.users(List of String) – User IDs for responders. Set to an empty list to remove all user responders.
stakeholders(Attributes) – Stakeholders for the service.users(List of String) – User IDs for stakeholders. Set to an empty list to remove all user stakeholders.
Read-only resources
id(String) – The unique identifier of the JSM service.
設定例
resource "atlassian-operations_service" "example" {
name = "Example Service"
description = "Service for handling customer-facing API requests"
owner = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
tier = 1
type = “SOFTWARE_SERVICES"
change_approvers {
groups = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
}
projects {
ids = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
}
responders {
teams = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
users = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
}
stakeholders {
users = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
}
}この内容はお役に立ちましたか?