1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. DeploymentFreeze
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

octopusdeploy.DeploymentFreeze

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.octopusdeploy.DeploymentFreeze;
    import com.pulumi.octopusdeploy.DeploymentFreezeArgs;
    import com.pulumi.octopusdeploy.inputs.DeploymentFreezeRecurringScheduleArgs;
    import com.pulumi.octopusdeploy.DeploymentFreezeProject;
    import com.pulumi.octopusdeploy.DeploymentFreezeProjectArgs;
    import com.pulumi.octopusdeploy.DeploymentFreezeTenant;
    import com.pulumi.octopusdeploy.DeploymentFreezeTenantArgs;
    import java.util.List;
    import java.util.ArrayList;
    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) {
            // basic freeze with no project scopes
            var freezeDeploymentFreeze = new DeploymentFreeze("freezeDeploymentFreeze", DeploymentFreezeArgs.builder()
                .start("2024-12-25T00:00:00+10:00")
                .end("2024-12-27T00:00:00+08:00")
                .build());
    
            // Freeze with different timezones and single project/environment scope
            var freezeIndex_deploymentFreezeDeploymentFreeze = new DeploymentFreeze("freezeIndex/deploymentFreezeDeploymentFreeze", DeploymentFreezeArgs.builder()
                .start("2024-12-25T00:00:00+10:00")
                .end("2024-12-27T00:00:00+08:00")
                .build());
    
            // Freeze recurring freeze yearly on Xmas
            var freezeOctopusdeployIndex_deploymentFreezeDeploymentFreeze = new DeploymentFreeze("freezeOctopusdeployIndex/deploymentFreezeDeploymentFreeze", DeploymentFreezeArgs.builder()
                .start("2024-12-25T00:00:00+10:00")
                .end("2024-12-27T00:00:00+08:00")
                .recurringSchedule(DeploymentFreezeRecurringScheduleArgs.builder()
                    .type("Annually")
                    .unit(1)
                    .end_type("Never")
                    .build())
                .build());
    
            var projectFreezeDeploymentFreezeProject = new DeploymentFreezeProject("projectFreezeDeploymentFreezeProject", DeploymentFreezeProjectArgs.builder()
                .deploymentfreezeId(freezeDeploymentFreeze.id())
                .projectId("Projects-123")
                .environmentIds(            
                    "Environments-123",
                    "Environments-456")
                .build());
    
            // Freeze with ids sourced from resources and datasources. Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
            var freezeOctopusdeployIndex_deploymentFreezeDeploymentFreeze1 = new DeploymentFreeze("freezeOctopusdeployIndex/deploymentFreezeDeploymentFreeze1", DeploymentFreezeArgs.builder()
                .start("2025-06-30T00:00:00+10:00")
                .end("2025-07-02T00:00:00+10:00")
                .build());
    
            var projectFreezeIndex_deploymentFreezeProjectDeploymentFreezeProject = new DeploymentFreezeProject("projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject", DeploymentFreezeProjectArgs.builder()
                .deploymentfreezeId(freezeDeploymentFreeze.id())
                .projectId(resource.octopusdeploy_project().project1().id())
                .environmentIds(resource.octopusdeploy_environment().production().id())
                .build());
    
            var projectFreezeOctopusdeployIndex_deploymentFreezeProjectDeploymentFreezeProject = new DeploymentFreezeProject("projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject", DeploymentFreezeProjectArgs.builder()
                .deploymentfreezeId(freezeDeploymentFreeze.id())
                .projectId(data.octopusdeploy_projects().second_project().projects()[0].id())
                .environmentIds(data.octopusdeploy_environments().default_environment().environments()[0].id())
                .build());
    
            var tenantFreeze = new DeploymentFreezeTenant("tenantFreeze", DeploymentFreezeTenantArgs.builder()
                .deploymentfreezeId(freezeDeploymentFreeze.id())
                .tenantId("Tenants-1")
                .projectId("Projects-1")
                .environmentId("Environments-1")
                .build());
    
        }
    }
    
    resources:
      # basic freeze with no project scopes
      freezeDeploymentFreeze:
        type: octopusdeploy:DeploymentFreeze
        properties:
          start: 2024-12-25T00:00:00+10:00
          end: 2024-12-27T00:00:00+08:00
      # Freeze with different timezones and single project/environment scope
      freezeIndex/deploymentFreezeDeploymentFreeze:
        type: octopusdeploy:DeploymentFreeze
        properties:
          start: 2024-12-25T00:00:00+10:00
          end: 2024-12-27T00:00:00+08:00
      # Freeze recurring freeze yearly on Xmas
      freezeOctopusdeployIndex/deploymentFreezeDeploymentFreeze:
        type: octopusdeploy:DeploymentFreeze
        properties:
          start: 2024-12-25T00:00:00+10:00
          end: 2024-12-27T00:00:00+08:00
          recurringSchedule:
            type: Annually
            unit: 1
            end_type: Never
      projectFreezeDeploymentFreezeProject:
        type: octopusdeploy:DeploymentFreezeProject
        properties:
          deploymentfreezeId: ${freezeDeploymentFreeze.id}
          projectId: Projects-123
          environmentIds:
            - Environments-123
            - Environments-456
      # Freeze with ids sourced from resources and datasources. Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
      freezeOctopusdeployIndex/deploymentFreezeDeploymentFreeze1:
        type: octopusdeploy:DeploymentFreeze
        properties:
          start: 2025-06-30T00:00:00+10:00
          end: 2025-07-02T00:00:00+10:00
      projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject:
        type: octopusdeploy:DeploymentFreezeProject
        properties:
          deploymentfreezeId: ${freezeDeploymentFreeze.id}
          projectId: ${resource.octopusdeploy_project.project1.id}
          environmentIds:
            - ${resource.octopusdeploy_environment.production.id}
      projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject:
        type: octopusdeploy:DeploymentFreezeProject
        properties:
          deploymentfreezeId: ${freezeDeploymentFreeze.id}
          projectId: ${data.octopusdeploy_projects.second_project.projects[0].id}
          environmentIds:
            - ${data.octopusdeploy_environments.default_environment.environments[0].id}
      tenantFreeze:
        type: octopusdeploy:DeploymentFreezeTenant
        properties:
          deploymentfreezeId: ${freezeDeploymentFreeze.id}
          tenantId: Tenants-1
          projectId: Projects-1
          environmentId: Environments-1
    

    Create DeploymentFreeze Resource

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

    Constructor syntax

    new DeploymentFreeze(name: string, args: DeploymentFreezeArgs, opts?: CustomResourceOptions);
    @overload
    def DeploymentFreeze(resource_name: str,
                         args: DeploymentFreezeArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeploymentFreeze(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         end: Optional[str] = None,
                         start: Optional[str] = None,
                         name: Optional[str] = None,
                         recurring_schedule: Optional[DeploymentFreezeRecurringScheduleArgs] = None)
    func NewDeploymentFreeze(ctx *Context, name string, args DeploymentFreezeArgs, opts ...ResourceOption) (*DeploymentFreeze, error)
    public DeploymentFreeze(string name, DeploymentFreezeArgs args, CustomResourceOptions? opts = null)
    public DeploymentFreeze(String name, DeploymentFreezeArgs args)
    public DeploymentFreeze(String name, DeploymentFreezeArgs args, CustomResourceOptions options)
    
    type: octopusdeploy:DeploymentFreeze
    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 DeploymentFreezeArgs
    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 DeploymentFreezeArgs
    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 DeploymentFreezeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeploymentFreezeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeploymentFreezeArgs
    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 deploymentFreezeResource = new Octopusdeploy.DeploymentFreeze("deploymentFreezeResource", new()
    {
        End = "string",
        Start = "string",
        Name = "string",
        RecurringSchedule = new Octopusdeploy.Inputs.DeploymentFreezeRecurringScheduleArgs
        {
            EndType = "string",
            Type = "string",
            Unit = 0,
            DateOfMonth = "string",
            DayNumberOfMonth = "string",
            DayOfWeek = "string",
            DaysOfWeeks = new[]
            {
                "string",
            },
            EndAfterOccurrences = 0,
            EndOnDate = "string",
            MonthlyScheduleType = "string",
        },
    });
    
    example, err := octopusdeploy.NewDeploymentFreeze(ctx, "deploymentFreezeResource", &octopusdeploy.DeploymentFreezeArgs{
    	End:   pulumi.String("string"),
    	Start: pulumi.String("string"),
    	Name:  pulumi.String("string"),
    	RecurringSchedule: &octopusdeploy.DeploymentFreezeRecurringScheduleArgs{
    		EndType:          pulumi.String("string"),
    		Type:             pulumi.String("string"),
    		Unit:             pulumi.Float64(0),
    		DateOfMonth:      pulumi.String("string"),
    		DayNumberOfMonth: pulumi.String("string"),
    		DayOfWeek:        pulumi.String("string"),
    		DaysOfWeeks: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		EndAfterOccurrences: pulumi.Float64(0),
    		EndOnDate:           pulumi.String("string"),
    		MonthlyScheduleType: pulumi.String("string"),
    	},
    })
    
    var deploymentFreezeResource = new DeploymentFreeze("deploymentFreezeResource", DeploymentFreezeArgs.builder()
        .end("string")
        .start("string")
        .name("string")
        .recurringSchedule(DeploymentFreezeRecurringScheduleArgs.builder()
            .endType("string")
            .type("string")
            .unit(0)
            .dateOfMonth("string")
            .dayNumberOfMonth("string")
            .dayOfWeek("string")
            .daysOfWeeks("string")
            .endAfterOccurrences(0)
            .endOnDate("string")
            .monthlyScheduleType("string")
            .build())
        .build());
    
    deployment_freeze_resource = octopusdeploy.DeploymentFreeze("deploymentFreezeResource",
        end="string",
        start="string",
        name="string",
        recurring_schedule={
            "end_type": "string",
            "type": "string",
            "unit": 0,
            "date_of_month": "string",
            "day_number_of_month": "string",
            "day_of_week": "string",
            "days_of_weeks": ["string"],
            "end_after_occurrences": 0,
            "end_on_date": "string",
            "monthly_schedule_type": "string",
        })
    
    const deploymentFreezeResource = new octopusdeploy.DeploymentFreeze("deploymentFreezeResource", {
        end: "string",
        start: "string",
        name: "string",
        recurringSchedule: {
            endType: "string",
            type: "string",
            unit: 0,
            dateOfMonth: "string",
            dayNumberOfMonth: "string",
            dayOfWeek: "string",
            daysOfWeeks: ["string"],
            endAfterOccurrences: 0,
            endOnDate: "string",
            monthlyScheduleType: "string",
        },
    });
    
    type: octopusdeploy:DeploymentFreeze
    properties:
        end: string
        name: string
        recurringSchedule:
            dateOfMonth: string
            dayNumberOfMonth: string
            dayOfWeek: string
            daysOfWeeks:
                - string
            endAfterOccurrences: 0
            endOnDate: string
            endType: string
            monthlyScheduleType: string
            type: string
            unit: 0
        start: string
    

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

    End string
    The end time of the freeze, must be RFC3339 format
    Start string
    The start time of the freeze, must be RFC3339 format
    Name string
    The name of this resource.
    RecurringSchedule DeploymentFreezeRecurringSchedule
    End string
    The end time of the freeze, must be RFC3339 format
    Start string
    The start time of the freeze, must be RFC3339 format
    Name string
    The name of this resource.
    RecurringSchedule DeploymentFreezeRecurringScheduleArgs
    end String
    The end time of the freeze, must be RFC3339 format
    start String
    The start time of the freeze, must be RFC3339 format
    name String
    The name of this resource.
    recurringSchedule DeploymentFreezeRecurringSchedule
    end string
    The end time of the freeze, must be RFC3339 format
    start string
    The start time of the freeze, must be RFC3339 format
    name string
    The name of this resource.
    recurringSchedule DeploymentFreezeRecurringSchedule
    end str
    The end time of the freeze, must be RFC3339 format
    start str
    The start time of the freeze, must be RFC3339 format
    name str
    The name of this resource.
    recurring_schedule DeploymentFreezeRecurringScheduleArgs
    end String
    The end time of the freeze, must be RFC3339 format
    start String
    The start time of the freeze, must be RFC3339 format
    name String
    The name of this resource.
    recurringSchedule Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DeploymentFreeze 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 DeploymentFreeze Resource

    Get an existing DeploymentFreeze 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?: DeploymentFreezeState, opts?: CustomResourceOptions): DeploymentFreeze
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            end: Optional[str] = None,
            name: Optional[str] = None,
            recurring_schedule: Optional[DeploymentFreezeRecurringScheduleArgs] = None,
            start: Optional[str] = None) -> DeploymentFreeze
    func GetDeploymentFreeze(ctx *Context, name string, id IDInput, state *DeploymentFreezeState, opts ...ResourceOption) (*DeploymentFreeze, error)
    public static DeploymentFreeze Get(string name, Input<string> id, DeploymentFreezeState? state, CustomResourceOptions? opts = null)
    public static DeploymentFreeze get(String name, Output<String> id, DeploymentFreezeState state, CustomResourceOptions options)
    resources:  _:    type: octopusdeploy:DeploymentFreeze    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.
    The following state arguments are supported:
    End string
    The end time of the freeze, must be RFC3339 format
    Name string
    The name of this resource.
    RecurringSchedule DeploymentFreezeRecurringSchedule
    Start string
    The start time of the freeze, must be RFC3339 format
    End string
    The end time of the freeze, must be RFC3339 format
    Name string
    The name of this resource.
    RecurringSchedule DeploymentFreezeRecurringScheduleArgs
    Start string
    The start time of the freeze, must be RFC3339 format
    end String
    The end time of the freeze, must be RFC3339 format
    name String
    The name of this resource.
    recurringSchedule DeploymentFreezeRecurringSchedule
    start String
    The start time of the freeze, must be RFC3339 format
    end string
    The end time of the freeze, must be RFC3339 format
    name string
    The name of this resource.
    recurringSchedule DeploymentFreezeRecurringSchedule
    start string
    The start time of the freeze, must be RFC3339 format
    end str
    The end time of the freeze, must be RFC3339 format
    name str
    The name of this resource.
    recurring_schedule DeploymentFreezeRecurringScheduleArgs
    start str
    The start time of the freeze, must be RFC3339 format
    end String
    The end time of the freeze, must be RFC3339 format
    name String
    The name of this resource.
    recurringSchedule Property Map
    start String
    The start time of the freeze, must be RFC3339 format

    Supporting Types

    DeploymentFreezeRecurringSchedule, DeploymentFreezeRecurringScheduleArgs

    EndType string
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    Type string
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    Unit double
    The unit value for the schedule
    DateOfMonth string
    The date of the month for monthly schedules
    DayNumberOfMonth string
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    DayOfWeek string
    The day of the week for monthly schedules when using DayOfMonth type
    DaysOfWeeks List<string>
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    EndAfterOccurrences double
    Number of occurrences after which the schedule should end
    EndOnDate string
    The date when the recurring schedule should end
    MonthlyScheduleType string
    Type of monthly schedule (DayOfMonth, DateOfMonth)
    EndType string
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    Type string
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    Unit float64
    The unit value for the schedule
    DateOfMonth string
    The date of the month for monthly schedules
    DayNumberOfMonth string
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    DayOfWeek string
    The day of the week for monthly schedules when using DayOfMonth type
    DaysOfWeeks []string
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    EndAfterOccurrences float64
    Number of occurrences after which the schedule should end
    EndOnDate string
    The date when the recurring schedule should end
    MonthlyScheduleType string
    Type of monthly schedule (DayOfMonth, DateOfMonth)
    endType String
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    type String
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    unit Double
    The unit value for the schedule
    dateOfMonth String
    The date of the month for monthly schedules
    dayNumberOfMonth String
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    dayOfWeek String
    The day of the week for monthly schedules when using DayOfMonth type
    daysOfWeeks List<String>
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    endAfterOccurrences Double
    Number of occurrences after which the schedule should end
    endOnDate String
    The date when the recurring schedule should end
    monthlyScheduleType String
    Type of monthly schedule (DayOfMonth, DateOfMonth)
    endType string
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    type string
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    unit number
    The unit value for the schedule
    dateOfMonth string
    The date of the month for monthly schedules
    dayNumberOfMonth string
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    dayOfWeek string
    The day of the week for monthly schedules when using DayOfMonth type
    daysOfWeeks string[]
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    endAfterOccurrences number
    Number of occurrences after which the schedule should end
    endOnDate string
    The date when the recurring schedule should end
    monthlyScheduleType string
    Type of monthly schedule (DayOfMonth, DateOfMonth)
    end_type str
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    type str
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    unit float
    The unit value for the schedule
    date_of_month str
    The date of the month for monthly schedules
    day_number_of_month str
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    day_of_week str
    The day of the week for monthly schedules when using DayOfMonth type
    days_of_weeks Sequence[str]
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    end_after_occurrences float
    Number of occurrences after which the schedule should end
    end_on_date str
    The date when the recurring schedule should end
    monthly_schedule_type str
    Type of monthly schedule (DayOfMonth, DateOfMonth)
    endType String
    When the recurring schedule should end (Never, OnDate, AfterOccurrences)
    type String
    Type of recurring schedule (Daily, Weekly, Monthly, Annually)
    unit Number
    The unit value for the schedule
    dateOfMonth String
    The date of the month for monthly schedules
    dayNumberOfMonth String
    Specifies which weekday position in the month. Valid values: 1 (First), 2 (Second), 3 (Third), 4 (Fourth), L (Last). Used with dayofweek
    dayOfWeek String
    The day of the week for monthly schedules when using DayOfMonth type
    daysOfWeeks List<String>
    List of days of the week for weekly schedules. Must follow order: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
    endAfterOccurrences Number
    Number of occurrences after which the schedule should end
    endOnDate String
    The date when the recurring schedule should end
    monthlyScheduleType String
    Type of monthly schedule (DayOfMonth, DateOfMonth)

    Package Details

    Repository
    octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
    License
    Notes
    This Pulumi package is based on the octopusdeploy Terraform Provider.
    octopusdeploy logo
    octopusdeploy 0.43.1 published on Wednesday, Apr 30, 2025 by octopusdeploylabs