published on Thursday, May 7, 2026 by rootlyhq
published on Thursday, May 7, 2026 by rootlyhq
Example Usage
data "rootly_user" "john" {
email = "demo@rootly.com"
}
data "rootly_user" "jane" {
email = "demo1@rootly.com"
}
resource "rootly_schedule" "primary" {
name = "Primary On-Call Schedule"
owner_user_id = data.rootly_user.john.id
all_time_coverage = false
}
resource "rootly_schedule_rotation" "weekdays" {
schedule_id = rootly_schedule.primary.id
name = "weekdays"
active_all_week = false
active_days = [
"M",
"T",
"W",
"R",
"F",
]
active_time_type = "custom"
position = 1
schedule_rotationable_attributes = {
handoff_time = "T",
handoff_time = "10:00"
}
schedule_rotationable_type = "ScheduleWeeklyRotation"
time_zone = "America/Toronto"
}
# Define active days for the weekday rotation
# Monday
resource "rootly_schedule_rotation_active_day" "m1-weekday" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
day_name = "M"
active_time_attributes {
start_time = "10:00"
end_time = "18:00"
}
}
# Tuesday
resource "rootly_schedule_rotation_active_day" "t1-weekday" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
day_name = "T"
active_time_attributes {
start_time = "10:00"
end_time = "18:00"
}
}
# Wednesday
resource "rootly_schedule_rotation_active_day" "w1-weekday" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
day_name = "W"
active_time_attributes {
start_time = "10:00"
end_time = "18:00"
}
}
# Thursday
resource "rootly_schedule_rotation_active_day" "th1-weekday" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
day_name = "R"
active_time_attributes {
start_time = "10:00"
end_time = "18:00"
}
}
# Friday
resource "rootly_schedule_rotation_active_day" "f1-weekday" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
day_name = "F"
active_time_attributes {
start_time = "10:00"
end_time = "18:00"
}
}
resource "rootly_schedule_rotation_user" "john" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
position = 1
user_id = data.rootly_user.john.id
}
resource "rootly_schedule_rotation_user" "jane" {
schedule_rotation_id = rootly_schedule_rotation.weekdays.id
position = 2
user_id = data.rootly_user.jane.id
}
Create Schedule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schedule(name: string, args?: ScheduleArgs, opts?: CustomResourceOptions);@overload
def Schedule(resource_name: str,
args: Optional[ScheduleArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Schedule(resource_name: str,
opts: Optional[ResourceOptions] = None,
all_time_coverage: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_group_ids: Optional[Sequence[str]] = None,
owner_user_id: Optional[int] = None,
slack_channel: Optional[Mapping[str, str]] = None,
slack_user_group: Optional[Mapping[str, str]] = None)func NewSchedule(ctx *Context, name string, args *ScheduleArgs, opts ...ResourceOption) (*Schedule, error)public Schedule(string name, ScheduleArgs? args = null, CustomResourceOptions? opts = null)
public Schedule(String name, ScheduleArgs args)
public Schedule(String name, ScheduleArgs args, CustomResourceOptions options)
type: rootly:Schedule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scheduleResource = new Rootly.Schedule("scheduleResource", new()
{
AllTimeCoverage = false,
Description = "string",
Name = "string",
OwnerGroupIds = new[]
{
"string",
},
OwnerUserId = 0,
SlackChannel =
{
{ "string", "string" },
},
SlackUserGroup =
{
{ "string", "string" },
},
});
example, err := rootly.NewSchedule(ctx, "scheduleResource", &rootly.ScheduleArgs{
AllTimeCoverage: pulumi.Bool(false),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OwnerGroupIds: pulumi.StringArray{
pulumi.String("string"),
},
OwnerUserId: pulumi.Int(0),
SlackChannel: pulumi.StringMap{
"string": pulumi.String("string"),
},
SlackUserGroup: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var scheduleResource = new Schedule("scheduleResource", ScheduleArgs.builder()
.allTimeCoverage(false)
.description("string")
.name("string")
.ownerGroupIds("string")
.ownerUserId(0)
.slackChannel(Map.of("string", "string"))
.slackUserGroup(Map.of("string", "string"))
.build());
schedule_resource = rootly.Schedule("scheduleResource",
all_time_coverage=False,
description="string",
name="string",
owner_group_ids=["string"],
owner_user_id=0,
slack_channel={
"string": "string",
},
slack_user_group={
"string": "string",
})
const scheduleResource = new rootly.Schedule("scheduleResource", {
allTimeCoverage: false,
description: "string",
name: "string",
ownerGroupIds: ["string"],
ownerUserId: 0,
slackChannel: {
string: "string",
},
slackUserGroup: {
string: "string",
},
});
type: rootly:Schedule
properties:
allTimeCoverage: false
description: string
name: string
ownerGroupIds:
- string
ownerUserId: 0
slackChannel:
string: string
slackUserGroup:
string: string
Schedule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Schedule resource accepts the following input properties:
- All
Time boolCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- Description string
- The description of the schedule
- Name string
- The name of the schedule
- Owner
Group List<string>Ids - The owning teams for this schedules.
- Owner
User intId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- Slack
Channel Dictionary<string, string> - Map must contain two fields,
idandname. Synced slack channel of the schedule - Slack
User Dictionary<string, string>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- All
Time boolCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- Description string
- The description of the schedule
- Name string
- The name of the schedule
- Owner
Group []stringIds - The owning teams for this schedules.
- Owner
User intId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- Slack
Channel map[string]string - Map must contain two fields,
idandname. Synced slack channel of the schedule - Slack
User map[string]stringGroup - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time BooleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description String
- The description of the schedule
- name String
- The name of the schedule
- owner
Group List<String>Ids - The owning teams for this schedules.
- owner
User IntegerId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel Map<String,String> - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User Map<String,String>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time booleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description string
- The description of the schedule
- name string
- The name of the schedule
- owner
Group string[]Ids - The owning teams for this schedules.
- owner
User numberId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel {[key: string]: string} - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User {[key: string]: string}Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all_
time_ boolcoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description str
- The description of the schedule
- name str
- The name of the schedule
- owner_
group_ Sequence[str]ids - The owning teams for this schedules.
- owner_
user_ intid - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack_
channel Mapping[str, str] - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack_
user_ Mapping[str, str]group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time BooleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description String
- The description of the schedule
- name String
- The name of the schedule
- owner
Group List<String>Ids - The owning teams for this schedules.
- owner
User NumberId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel Map<String> - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User Map<String>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
Outputs
All input properties are implicitly available as output properties. Additionally, the Schedule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Schedule Resource
Get an existing Schedule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScheduleState, opts?: CustomResourceOptions): Schedule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
all_time_coverage: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None,
owner_group_ids: Optional[Sequence[str]] = None,
owner_user_id: Optional[int] = None,
slack_channel: Optional[Mapping[str, str]] = None,
slack_user_group: Optional[Mapping[str, str]] = None) -> Schedulefunc GetSchedule(ctx *Context, name string, id IDInput, state *ScheduleState, opts ...ResourceOption) (*Schedule, error)public static Schedule Get(string name, Input<string> id, ScheduleState? state, CustomResourceOptions? opts = null)public static Schedule get(String name, Output<String> id, ScheduleState state, CustomResourceOptions options)resources: _: type: rootly:Schedule get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- All
Time boolCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- Description string
- The description of the schedule
- Name string
- The name of the schedule
- Owner
Group List<string>Ids - The owning teams for this schedules.
- Owner
User intId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- Slack
Channel Dictionary<string, string> - Map must contain two fields,
idandname. Synced slack channel of the schedule - Slack
User Dictionary<string, string>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- All
Time boolCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- Description string
- The description of the schedule
- Name string
- The name of the schedule
- Owner
Group []stringIds - The owning teams for this schedules.
- Owner
User intId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- Slack
Channel map[string]string - Map must contain two fields,
idandname. Synced slack channel of the schedule - Slack
User map[string]stringGroup - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time BooleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description String
- The description of the schedule
- name String
- The name of the schedule
- owner
Group List<String>Ids - The owning teams for this schedules.
- owner
User IntegerId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel Map<String,String> - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User Map<String,String>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time booleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description string
- The description of the schedule
- name string
- The name of the schedule
- owner
Group string[]Ids - The owning teams for this schedules.
- owner
User numberId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel {[key: string]: string} - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User {[key: string]: string}Group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all_
time_ boolcoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description str
- The description of the schedule
- name str
- The name of the schedule
- owner_
group_ Sequence[str]ids - The owning teams for this schedules.
- owner_
user_ intid - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack_
channel Mapping[str, str] - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack_
user_ Mapping[str, str]group - Map must contain two fields,
idandname. Synced slack group of the schedule
- all
Time BooleanCoverage - 24/7 coverage of the schedule. Value must be one of true or false
- description String
- The description of the schedule
- name String
- The name of the schedule
- owner
Group List<String>Ids - The owning teams for this schedules.
- owner
User NumberId - ID of user assigned as owner of the schedule. Defaults to the API token's user if not specified.
- slack
Channel Map<String> - Map must contain two fields,
idandname. Synced slack channel of the schedule - slack
User Map<String>Group - Map must contain two fields,
idandname. Synced slack group of the schedule
Import
rootly.Schedule can be imported using the import command.
$ pulumi import rootly:index/schedule:Schedule primary a816421c-6ceb-481a-87c4-585e47451f24
Or using an import block.
Locate the resource id in the web app, or retrieve it by listing resources through the API if it’s not visible in the web app.
HCL can be generated from the import block using the -generate-config-out flag.
pulumi preview -generate-config-out=generated.tf
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- rootly rootlyhq/pulumi-rootly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rootlyTerraform Provider.
published on Thursday, May 7, 2026 by rootlyhq
