Scheduled Exports

A Scheduled Export defines a recurring schedule for generating one of the built-in CSV exports and e-mailing it to a Site Admin recipient.

Resource Schema

Required

PropertyDescription
name
String
Name for this scheduled export.
export_type
String
Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit

Optional

PropertyDescription
export_options
Dynamic
Report-specific options. permission_audit supports group_by with user or path.
user_id
Int64
Site Admin user who receives the completed export e-mail.
disabled
Bool
If true, this scheduled export will not run.
trigger
String
Schedule trigger type: daily or custom_schedule.
Possible values: daily, custom_schedule
interval
String
If trigger is daily, this specifies how often to run the scheduled export.
recurring_day
Int64
If trigger is daily, this selects the day number inside the chosen interval.
recurring_days
List
If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
schedule_id
Int64
If trigger is custom_schedule, the reusable Schedule used instead of the scheduled export's schedule fields.
schedule_days_of_week
List
If trigger is custom_schedule, the 0-based weekdays used by the schedule.
schedule_times_of_day
List
Times of day in HH:MM format for the scheduled export schedule.
schedule_time_zone
String
Time zone used by the scheduled export schedule.
holiday_region
String
Optional holiday region used by the scheduled export schedule.

Read Only

PropertyDescription
id
Int64
Scheduled Export ID
report_name
String
Human-readable report name.
human_readable_schedule
String
Human-readable schedule description.
last_run_at
String
Most recent scheduled run time.
last_export_id
Int64
Most recent Export ID created by this schedule.
created_at
String
Creation time.
updated_at
String
Last update time.

Example Resource

resource "files_scheduled_export" "example_scheduled_export" {
  name                  = "Monthly access review"
  export_type           = "permission_audit"
  export_options        = {
    group_by = "user"
  }
  user_id               = 1
  disabled              = true
  trigger               = "daily"
  interval              = "month"
  recurring_day         = 1
  recurring_days        = [1, 15]
  schedule_id           = 1
  schedule_days_of_week = [1, 3, 5]
  schedule_times_of_day = ["06:30"]
  schedule_time_zone    = "Eastern Time (US & Canada)"
  holiday_region        = "us"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Scheduled Exports can be imported by specifying the id.
terraform import files_scheduled_export.example_scheduled_export 1

Data Source Schema

Required

PropertyDescription
id
Int64
Scheduled Export ID

Read Only

PropertyDescription
name
String
Name for this scheduled export.
export_type
String
Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
report_name
String
Human-readable report name.
export_options
Dynamic
Report-specific options. permission_audit supports group_by with user or path.
user_id
Int64
Site Admin user who receives the completed export e-mail.
disabled
Bool
If true, this scheduled export will not run.
trigger
String
Schedule trigger type: daily or custom_schedule.
Possible values: daily, custom_schedule
interval
String
If trigger is daily, this specifies how often to run the scheduled export.
recurring_day
Int64
If trigger is daily, this selects the day number inside the chosen interval.
recurring_days
List
If trigger is daily, this selects one or more day numbers inside a week, month, quarter, or year interval.
schedule_id
Int64
If trigger is custom_schedule, the reusable Schedule used instead of the scheduled export's schedule fields.
schedule_days_of_week
List
If trigger is custom_schedule, the 0-based weekdays used by the schedule.
schedule_times_of_day
List
Times of day in HH:MM format for the scheduled export schedule.
schedule_time_zone
String
Time zone used by the scheduled export schedule.
holiday_region
String
Optional holiday region used by the scheduled export schedule.
human_readable_schedule
String
Human-readable schedule description.
last_run_at
String
Most recent scheduled run time.
last_export_id
Int64
Most recent Export ID created by this schedule.
created_at
String
Creation time.
updated_at
String
Last update time.

Example Data Source

data "files_scheduled_export" "example_scheduled_export" {
  id = 1
}