Holiday Calendars

A Holiday Calendar defines site-wide holiday dates and optional partial-day windows that scheduled resources skip.

Resource Schema

Required

PropertyDescription
name
String
Holiday Calendar name.
definition
Object
Holiday rules for the calendar.

Read Only

PropertyDescription
id
Int64
Holiday Calendar ID. Set a scheduled resource's holiday_region to custom_ followed by this ID to make it skip the days in this calendar.
created_at
String
Creation time.
updated_at
String
Last update time.

Example Resource

resource "files_holiday_calendar" "example_holiday_calendar" {
  definition = {
    months = {
      "0"  = {
        calculated_rules = [
          {
            name              = "Good Friday"
            function          = "easter(year)"
            function_modifier = -2
          }
        ]
      }
      "1"  = {
        fixed_rules   = [
          {
            name     = "New Year's Day"
            mday     = 1
            observed = "to_weekday_if_weekend(date)"
          }
        ]
        weekday_rules = [
          {
            name = "Third Monday"
            week = 3
            wday = 1
          }
        ]
      }
      "11" = {
        weekday_rules = [
          {
            name = "Thanksgiving"
            week = 4
            wday = 4
          }
        ]
      }
      "12" = {
        fixed_rules = [
          {
            name        = "Christmas Eve Early Close"
            mday        = 24
            start_time  = "13:00"
            end_time    = "17:00"
            year_ranges = {
              from = 2026
            }
          }
        ]
      }
    }
  }
  name       = "Company Holidays"
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Holiday Calendars can be imported by specifying the id.
terraform import files_holiday_calendar.example_holiday_calendar 1

Data Source Schema

Required

PropertyDescription
id
Int64
Holiday Calendar ID. Set a scheduled resource's holiday_region to custom_ followed by this ID to make it skip the days in this calendar.

Read Only

PropertyDescription
name
String
Holiday Calendar name.
definition
Object
Holiday rules for the calendar.
created_at
String
Creation time.
updated_at
String
Last update time.

Example Data Source

data "files_holiday_calendar" "example_holiday_calendar" {
  id = 1
}