1. Registry
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. MaintenanceWindow
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi
mongodbatlas logo mongodbatlas logo
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi

    mongodbatlas.MaintenanceWindow provides a resource to schedule the maintenance window for your MongoDB Atlas Project and/or set to defer a scheduled maintenance up to two times. Please refer to Maintenance Windows documentation for more details.

    The Official MongoDB Atlas Project Module makes use of this resource and simplifies maintenance window configuration as part of project management.

    NOTE: Only a single maintenance window resource can be defined per project.

    NOTE: Maintenance window times use the project’s configured timezone. To change the timezone, update the Project Time Zone setting in the Atlas Project Settings.

    Maintenance Window Considerations:

    • Urgent Maintenance Activities Cannot Wait: Urgent maintenance activities such as security patches cannot wait for your chosen window. Atlas will start those maintenance activities when needed.

    Once maintenance is scheduled for your cluster, you cannot change your maintenance window until the current maintenance efforts have completed.

    • Maintenance Requires Replica Set Elections: Atlas performs maintenance the same way as the manual maintenance procedure. This requires at least one replica set election during the maintenance window per replica set.
    • Maintenance Starts As Close to the Hour As Possible: Maintenance always begins as close to the scheduled hour as possible, but in-progress cluster updates or expected system issues could delay the start time.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.MaintenanceWindow("test", {
        projectId: "<your-project-id>",
        dayOfWeek: 3,
        hourOfDay: 4,
        protectedHours: {
            startHourOfDay: 9,
            endHourOfDay: 17,
        },
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.MaintenanceWindow("test",
        project_id="<your-project-id>",
        day_of_week=3,
        hour_of_day=4,
        protected_hours={
            "start_hour_of_day": 9,
            "end_hour_of_day": 17,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewMaintenanceWindow(ctx, "test", &mongodbatlas.MaintenanceWindowArgs{
    			ProjectId: pulumi.String("<your-project-id>"),
    			DayOfWeek: pulumi.Int(3),
    			HourOfDay: pulumi.Int(4),
    			ProtectedHours: &mongodbatlas.MaintenanceWindowProtectedHoursArgs{
    				StartHourOfDay: pulumi.Int(9),
    				EndHourOfDay:   pulumi.Int(17),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.MaintenanceWindow("test", new()
        {
            ProjectId = "<your-project-id>",
            DayOfWeek = 3,
            HourOfDay = 4,
            ProtectedHours = new Mongodbatlas.Inputs.MaintenanceWindowProtectedHoursArgs
            {
                StartHourOfDay = 9,
                EndHourOfDay = 17,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MaintenanceWindow;
    import com.pulumi.mongodbatlas.MaintenanceWindowArgs;
    import com.pulumi.mongodbatlas.inputs.MaintenanceWindowProtectedHoursArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new MaintenanceWindow("test", MaintenanceWindowArgs.builder()
                .projectId("<your-project-id>")
                .dayOfWeek(3)
                .hourOfDay(4)
                .protectedHours(MaintenanceWindowProtectedHoursArgs.builder()
                    .startHourOfDay(9)
                    .endHourOfDay(17)
                    .build())
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:MaintenanceWindow
        properties:
          projectId: <your-project-id>
          dayOfWeek: 3
          hourOfDay: 4
          protectedHours:
            startHourOfDay: 9
            endHourOfDay: 17
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_maintenancewindow" "test" {
      project_id  = "<your-project-id>"
      day_of_week = 3
      hour_of_day = 4
      protected_hours = {
        start_hour_of_day = 9
        end_hour_of_day   = 17
      }
    }
    

    Automatic Deferral

    Use autoDeferOnceEnabled to enable or disable automatic deferral.

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.MaintenanceWindow("test", {
        projectId: "<your-project-id>",
        dayOfWeek: 3,
        hourOfDay: 4,
        autoDeferOnceEnabled: true,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.MaintenanceWindow("test",
        project_id="<your-project-id>",
        day_of_week=3,
        hour_of_day=4,
        auto_defer_once_enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewMaintenanceWindow(ctx, "test", &mongodbatlas.MaintenanceWindowArgs{
    			ProjectId:            pulumi.String("<your-project-id>"),
    			DayOfWeek:            pulumi.Int(3),
    			HourOfDay:            pulumi.Int(4),
    			AutoDeferOnceEnabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.MaintenanceWindow("test", new()
        {
            ProjectId = "<your-project-id>",
            DayOfWeek = 3,
            HourOfDay = 4,
            AutoDeferOnceEnabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MaintenanceWindow;
    import com.pulumi.mongodbatlas.MaintenanceWindowArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new MaintenanceWindow("test", MaintenanceWindowArgs.builder()
                .projectId("<your-project-id>")
                .dayOfWeek(3)
                .hourOfDay(4)
                .autoDeferOnceEnabled(true)
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:MaintenanceWindow
        properties:
          projectId: <your-project-id>
          dayOfWeek: 3
          hourOfDay: 4
          autoDeferOnceEnabled: true
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_maintenancewindow" "test" {
      project_id              = "<your-project-id>"
      day_of_week             = 3
      hour_of_day             = 4
      auto_defer_once_enabled = true
    }
    

    One-Time Manual Deferral

    Use defer to defer the next scheduled maintenance event by one week. This only works when maintenance is already scheduled.

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const test = new mongodbatlas.MaintenanceWindow("test", {
        projectId: "<your-project-id>",
        dayOfWeek: 3,
        hourOfDay: 4,
        defer: true,
    });
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    test = mongodbatlas.MaintenanceWindow("test",
        project_id="<your-project-id>",
        day_of_week=3,
        hour_of_day=4,
        defer=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := mongodbatlas.NewMaintenanceWindow(ctx, "test", &mongodbatlas.MaintenanceWindowArgs{
    			ProjectId: pulumi.String("<your-project-id>"),
    			DayOfWeek: pulumi.Int(3),
    			HourOfDay: pulumi.Int(4),
    			Defer:     pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Mongodbatlas.MaintenanceWindow("test", new()
        {
            ProjectId = "<your-project-id>",
            DayOfWeek = 3,
            HourOfDay = 4,
            Defer = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.MaintenanceWindow;
    import com.pulumi.mongodbatlas.MaintenanceWindowArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var test = new MaintenanceWindow("test", MaintenanceWindowArgs.builder()
                .projectId("<your-project-id>")
                .dayOfWeek(3)
                .hourOfDay(4)
                .defer(true)
                .build());
    
        }
    }
    
    resources:
      test:
        type: mongodbatlas:MaintenanceWindow
        properties:
          projectId: <your-project-id>
          dayOfWeek: 3
          hourOfDay: 4
          defer: true
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    resource "mongodbatlas_maintenancewindow" "test" {
      project_id  = "<your-project-id>"
      day_of_week = 3
      hour_of_day = 4
      defer       = true
    }
    

    Further Examples

    • Configure Maintenance Window

    Create MaintenanceWindow Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MaintenanceWindow(name: string, args: MaintenanceWindowArgs, opts?: CustomResourceOptions);
    @overload
    def MaintenanceWindow(resource_name: str,
                          args: MaintenanceWindowArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def MaintenanceWindow(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          project_id: Optional[str] = None,
                          auto_defer: Optional[bool] = None,
                          auto_defer_once_enabled: Optional[bool] = None,
                          day_of_week: Optional[int] = None,
                          defer: Optional[bool] = None,
                          hour_of_day: Optional[int] = None,
                          protected_hours: Optional[MaintenanceWindowProtectedHoursArgs] = None,
                          wave_assignment: Optional[int] = None)
    func NewMaintenanceWindow(ctx *Context, name string, args MaintenanceWindowArgs, opts ...ResourceOption) (*MaintenanceWindow, error)
    public MaintenanceWindow(string name, MaintenanceWindowArgs args, CustomResourceOptions? opts = null)
    public MaintenanceWindow(String name, MaintenanceWindowArgs args)
    public MaintenanceWindow(String name, MaintenanceWindowArgs args, CustomResourceOptions options)
    
    type: mongodbatlas:MaintenanceWindow
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "mongodbatlas_maintenance_window" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args MaintenanceWindowArgs
    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 MaintenanceWindowArgs
    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 MaintenanceWindowArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MaintenanceWindowArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MaintenanceWindowArgs
    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 maintenanceWindowResource = new Mongodbatlas.MaintenanceWindow("maintenanceWindowResource", new()
    {
        ProjectId = "string",
        AutoDefer = false,
        AutoDeferOnceEnabled = false,
        DayOfWeek = 0,
        Defer = false,
        HourOfDay = 0,
        ProtectedHours = new Mongodbatlas.Inputs.MaintenanceWindowProtectedHoursArgs
        {
            EndHourOfDay = 0,
            StartHourOfDay = 0,
        },
        WaveAssignment = 0,
    });
    
    example, err := mongodbatlas.NewMaintenanceWindow(ctx, "maintenanceWindowResource", &mongodbatlas.MaintenanceWindowArgs{
    	ProjectId:            pulumi.String("string"),
    	AutoDefer:            pulumi.Bool(false),
    	AutoDeferOnceEnabled: pulumi.Bool(false),
    	DayOfWeek:            pulumi.Int(0),
    	Defer:                pulumi.Bool(false),
    	HourOfDay:            pulumi.Int(0),
    	ProtectedHours: &mongodbatlas.MaintenanceWindowProtectedHoursArgs{
    		EndHourOfDay:   pulumi.Int(0),
    		StartHourOfDay: pulumi.Int(0),
    	},
    	WaveAssignment: pulumi.Int(0),
    })
    
    resource "mongodbatlas_maintenance_window" "maintenanceWindowResource" {
      lifecycle {
        create_before_destroy = true
      }
      project_id              = "string"
      auto_defer              = false
      auto_defer_once_enabled = false
      day_of_week             = 0
      defer                   = false
      hour_of_day             = 0
      protected_hours = {
        end_hour_of_day   = 0
        start_hour_of_day = 0
      }
      wave_assignment = 0
    }
    
    var maintenanceWindowResource = new MaintenanceWindow("maintenanceWindowResource", MaintenanceWindowArgs.builder()
        .projectId("string")
        .autoDefer(false)
        .autoDeferOnceEnabled(false)
        .dayOfWeek(0)
        .defer(false)
        .hourOfDay(0)
        .protectedHours(MaintenanceWindowProtectedHoursArgs.builder()
            .endHourOfDay(0)
            .startHourOfDay(0)
            .build())
        .waveAssignment(0)
        .build());
    
    maintenance_window_resource = mongodbatlas.MaintenanceWindow("maintenanceWindowResource",
        project_id="string",
        auto_defer=False,
        auto_defer_once_enabled=False,
        day_of_week=0,
        defer=False,
        hour_of_day=0,
        protected_hours={
            "end_hour_of_day": 0,
            "start_hour_of_day": 0,
        },
        wave_assignment=0)
    
    const maintenanceWindowResource = new mongodbatlas.MaintenanceWindow("maintenanceWindowResource", {
        projectId: "string",
        autoDefer: false,
        autoDeferOnceEnabled: false,
        dayOfWeek: 0,
        defer: false,
        hourOfDay: 0,
        protectedHours: {
            endHourOfDay: 0,
            startHourOfDay: 0,
        },
        waveAssignment: 0,
    });
    
    type: mongodbatlas:MaintenanceWindow
    properties:
        autoDefer: false
        autoDeferOnceEnabled: false
        dayOfWeek: 0
        defer: false
        hourOfDay: 0
        projectId: string
        protectedHours:
            endHourOfDay: 0
            startHourOfDay: 0
        waveAssignment: 0
    

    MaintenanceWindow 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 MaintenanceWindow resource accepts the following input properties:

    ProjectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    AutoDefer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    AutoDeferOnceEnabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    DayOfWeek int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    Defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    HourOfDay int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    ProtectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    WaveAssignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    ProjectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    AutoDefer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    AutoDeferOnceEnabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    DayOfWeek int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    Defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    HourOfDay int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    ProtectedHours MaintenanceWindowProtectedHoursArgs
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    WaveAssignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    project_id string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    auto_defer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    auto_defer_once_enabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    day_of_week number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hour_of_day number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    protected_hours object
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    wave_assignment number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    projectId String
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    autoDefer Boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled Boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek Integer
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer Boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay Integer
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    protectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    waveAssignment Integer
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    projectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    autoDefer boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    protectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    waveAssignment number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    project_id str
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    auto_defer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    auto_defer_once_enabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    day_of_week int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hour_of_day int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    protected_hours MaintenanceWindowProtectedHoursArgs
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    wave_assignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    projectId String
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    autoDefer Boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled Boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek Number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer Boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay Number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    protectedHours Property Map
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    waveAssignment Number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MaintenanceWindow resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NumberOfDeferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    StartAsap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    TimeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    Id string
    The provider-assigned unique ID for this managed resource.
    NumberOfDeferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    StartAsap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    TimeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    id string
    The provider-assigned unique ID for this managed resource.
    number_of_deferrals number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    start_asap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    time_zone_id string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    id String
    The provider-assigned unique ID for this managed resource.
    numberOfDeferrals Integer
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    startAsap Boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId String
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    id string
    The provider-assigned unique ID for this managed resource.
    numberOfDeferrals number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    startAsap boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    id str
    The provider-assigned unique ID for this managed resource.
    number_of_deferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    start_asap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    time_zone_id str
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    id String
    The provider-assigned unique ID for this managed resource.
    numberOfDeferrals Number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    startAsap Boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId String
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.

    Look up Existing MaintenanceWindow Resource

    Get an existing MaintenanceWindow 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?: MaintenanceWindowState, opts?: CustomResourceOptions): MaintenanceWindow
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_defer: Optional[bool] = None,
            auto_defer_once_enabled: Optional[bool] = None,
            day_of_week: Optional[int] = None,
            defer: Optional[bool] = None,
            hour_of_day: Optional[int] = None,
            number_of_deferrals: Optional[int] = None,
            project_id: Optional[str] = None,
            protected_hours: Optional[MaintenanceWindowProtectedHoursArgs] = None,
            start_asap: Optional[bool] = None,
            time_zone_id: Optional[str] = None,
            wave_assignment: Optional[int] = None) -> MaintenanceWindow
    func GetMaintenanceWindow(ctx *Context, name string, id IDInput, state *MaintenanceWindowState, opts ...ResourceOption) (*MaintenanceWindow, error)
    public static MaintenanceWindow Get(string name, Input<string> id, MaintenanceWindowState? state, CustomResourceOptions? opts = null)
    public static MaintenanceWindow get(String name, Output<String> id, MaintenanceWindowState state, CustomResourceOptions options)
    resources:  _:    type: mongodbatlas:MaintenanceWindow    get:      id: ${id}
    import {
      to = mongodbatlas_maintenance_window.example
      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.
    The following state arguments are supported:
    AutoDefer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    AutoDeferOnceEnabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    DayOfWeek int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    Defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    HourOfDay int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    NumberOfDeferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    ProjectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    ProtectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    StartAsap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    TimeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    WaveAssignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    AutoDefer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    AutoDeferOnceEnabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    DayOfWeek int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    Defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    HourOfDay int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    NumberOfDeferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    ProjectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    ProtectedHours MaintenanceWindowProtectedHoursArgs
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    StartAsap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    TimeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    WaveAssignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    auto_defer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    auto_defer_once_enabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    day_of_week number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hour_of_day number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    number_of_deferrals number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    project_id string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    protected_hours object
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    start_asap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    time_zone_id string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    wave_assignment number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    autoDefer Boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled Boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek Integer
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer Boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay Integer
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    numberOfDeferrals Integer
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    projectId String
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    protectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    startAsap Boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId String
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    waveAssignment Integer
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    autoDefer boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    numberOfDeferrals number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    projectId string
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    protectedHours MaintenanceWindowProtectedHours
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    startAsap boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId string
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    waveAssignment number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    auto_defer bool
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    auto_defer_once_enabled bool
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    day_of_week int
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer bool
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hour_of_day int
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    number_of_deferrals int
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    project_id str
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    protected_hours MaintenanceWindowProtectedHoursArgs
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    start_asap bool
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    time_zone_id str
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    wave_assignment int
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.
    autoDefer Boolean
    Boolean flag to toggle automatic deferral on/off. Each change flips the current state (ON → OFF or OFF → ON). Achieves the same outcome as autoDeferOnceEnabled but through a toggle operation, which can make the current state opaque to Terraform and introduce state drift. For most use cases, prefer autoDeferOnceEnabled instead.
    autoDeferOnceEnabled Boolean
    Recommended field to enable or disable automatic deferral of all scheduled maintenance for the given project by one week. Achieves the same outcome as autoDefer, but by directly setting the value to true or false, which is idempotent and keeps Terraform state aligned with Atlas. If autoDefer is used to toggle the underlying flag, it will also affect the value of this attribute.
    dayOfWeek Number
    Day of the week when you would like the maintenance window to start as a 1-based integer: Su=1, M=2, T=3, W=4, T=5, F=6, Sa=7. Must be set together with hourOfDay. Omit both to set a waveAssignment without a maintenance window.
    defer Boolean
    Defer the next scheduled maintenance event for the given project by one week. Only works when maintenance is already scheduled.
    hourOfDay Number
    Hour of the day when you would like the maintenance window to start. This parameter uses the 24-hour clock, where midnight is 0, noon is 12. Uses the project's configured timezone. Must be set together with dayOfWeek. Omit both to set a waveAssignment without a maintenance window.
    numberOfDeferrals Number
    Number of times the current maintenance event for this project has been deferred, there can be a maximum of 2 deferrals.
    projectId String
    The unique identifier of the project for the Maintenance Window, also known as groupId in the official documentation.
    protectedHours Property Map
    Defines the time period during which there will be no standard updates to the clusters. See Protected Hours.
    startAsap Boolean
    Flag indicating whether project maintenance has been directed to start immediately. If requested, this field returns true from the time the request was made until the time the maintenance event completes.
    timeZoneId String
    Identifier for the current time zone of the maintenance window. This can only be updated via the Project Settings UI.
    waveAssignment Number
    Integer that identifies the maintenance wave explicitly assigned to this project. Not editable when the organization's wave assignment mode is ENV_TAG_MAPPING. In this case, the system preserves the stored value but does not use it for scheduling; environment tags determine the effective wave instead. Switching back to MANUAL restores the waveAssignment value as the effective wave. Remove this attribute from your configuration and run pulumi up to clear the explicit assignment. See mongodbatlas.OrgMaintenanceSettings to configure the organization-level wave assignment mode.

    Supporting Types

    MaintenanceWindowProtectedHours, MaintenanceWindowProtectedHoursArgs

    EndHourOfDay int
    Zero-based integer that represents the end hour of the day for the protected hours window.
    StartHourOfDay int
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    EndHourOfDay int
    Zero-based integer that represents the end hour of the day for the protected hours window.
    StartHourOfDay int
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    end_hour_of_day number
    Zero-based integer that represents the end hour of the day for the protected hours window.
    start_hour_of_day number
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    endHourOfDay Integer
    Zero-based integer that represents the end hour of the day for the protected hours window.
    startHourOfDay Integer
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    endHourOfDay number
    Zero-based integer that represents the end hour of the day for the protected hours window.
    startHourOfDay number
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    end_hour_of_day int
    Zero-based integer that represents the end hour of the day for the protected hours window.
    start_hour_of_day int
    Zero-based integer that represents the beginning hour of the day for the protected hours window.
    endHourOfDay Number
    Zero-based integer that represents the end hour of the day for the protected hours window.
    startHourOfDay Number
    Zero-based integer that represents the beginning hour of the day for the protected hours window.

    Import

    Maintenance Window entries can be imported using project project_id, in the format PROJECTID, e.g.

    $ pulumi import mongodbatlas:index/maintenanceWindow:MaintenanceWindow test 5d0f1f73cf09a29120e173cf
    

    For more information on Maintenance Windows, see: MongoDB Atlas API Reference.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo mongodbatlas logo
    Viewing docs for MongoDB Atlas v4.16.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial