Skip to content

Resource: awsSsmMaintenanceWindow

Provides an SSM Maintenance Window resource

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.ssmMaintenanceWindow.SsmMaintenanceWindow(this, "production", {
  cutoff: 1,
  duration: 3,
  name: "maintenance-window-application",
  schedule: "cron(0 16 ? * TUE *)",
});

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the maintenance window.
  • schedule - (Required) The schedule of the Maintenance Window in the form of a cron or rate expression.
  • cutoff - (Required) The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.
  • duration - (Required) The duration of the Maintenance Window in hours.
  • description - (Optional) A description for the maintenance window.
  • allowUnassociatedTargets - (Optional) Whether targets must be registered with the Maintenance Window before tasks can be defined for those targets.
  • enabled - (Optional) Whether the maintenance window is enabled. Default: true.
  • endDate - (Optional) Timestamp in ISO-8601 extended format when to no longer run the maintenance window.
  • scheduleTimezone - (Optional) Timezone for schedule in Internet Assigned Numbers Authority (IANA) Time Zone Database format. For example: america/losAngeles, etc/utc, or asia/seoul.
  • scheduleOffset - (Optional) The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
  • startDate - (Optional) Timestamp in ISO-8601 extended format when to begin the maintenance window.
  • tags - (Optional) A map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The ID of the maintenance window.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

SSM Maintenance Windows can be imported using the maintenanceWindowId, e.g.,

$ terraform import aws_ssm_maintenance_window.imported-window mw-0123456789