1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. DeploymentFreezeProject
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs

octopusdeploy.DeploymentFreezeProject

Explore with Pulumi AI

octopusdeploy logo
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs

    Supported by Octopus Server starting from version 2025.1

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    // Deployment freeze
    const freezeDeploymentFreeze = new octopusdeploy.DeploymentFreeze("freezeDeploymentFreeze", {
        start: "2024-12-25T00:00:00+10:00",
        end: "2024-12-27T00:00:00+08:00",
    });
    const projectFreezeDeploymentFreezeProject = new octopusdeploy.DeploymentFreezeProject("projectFreezeDeploymentFreezeProject", {
        deploymentfreezeId: freezeDeploymentFreeze.id,
        projectId: "Projects-123",
        environmentIds: [
            "Environments-123",
            "Environments-456",
        ],
    });
    // Freeze with ids sourced from resources and data sources. 
    // Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
    const freezeIndex_deploymentFreezeDeploymentFreeze = new octopusdeploy.DeploymentFreeze("freezeIndex/deploymentFreezeDeploymentFreeze", {
        start: "2025-06-30T00:00:00+10:00",
        end: "2025-07-02T00:00:00+10:00",
    });
    const projectFreezeIndex_deploymentFreezeProjectDeploymentFreezeProject = new octopusdeploy.DeploymentFreezeProject("projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject", {
        deploymentfreezeId: freezeDeploymentFreeze.id,
        projectId: resource.octopusdeploy_project.project1.id,
        environmentIds: [resource.octopusdeploy_environment.production.id],
    });
    const projectFreezeOctopusdeployIndex_deploymentFreezeProjectDeploymentFreezeProject = new octopusdeploy.DeploymentFreezeProject("projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject", {
        deploymentfreezeId: freezeDeploymentFreeze.id,
        projectId: data.octopusdeploy_projects.second_project.projects[0].id,
        environmentIds: [data.octopusdeploy_environments.default_environment.environments[0].id],
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    # Deployment freeze
    freeze_deployment_freeze = octopusdeploy.DeploymentFreeze("freezeDeploymentFreeze",
        start="2024-12-25T00:00:00+10:00",
        end="2024-12-27T00:00:00+08:00")
    project_freeze_deployment_freeze_project = octopusdeploy.DeploymentFreezeProject("projectFreezeDeploymentFreezeProject",
        deploymentfreeze_id=freeze_deployment_freeze.id,
        project_id="Projects-123",
        environment_ids=[
            "Environments-123",
            "Environments-456",
        ])
    # Freeze with ids sourced from resources and data sources. 
    # Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
    freeze_index_deployment_freeze_deployment_freeze = octopusdeploy.DeploymentFreeze("freezeIndex/deploymentFreezeDeploymentFreeze",
        start="2025-06-30T00:00:00+10:00",
        end="2025-07-02T00:00:00+10:00")
    project_freeze_index_deployment_freeze_project_deployment_freeze_project = octopusdeploy.DeploymentFreezeProject("projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject",
        deploymentfreeze_id=freeze_deployment_freeze.id,
        project_id=resource["octopusdeploy_project"]["project1"]["id"],
        environment_ids=[resource["octopusdeploy_environment"]["production"]["id"]])
    project_freeze_octopusdeploy_index_deployment_freeze_project_deployment_freeze_project = octopusdeploy.DeploymentFreezeProject("projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject",
        deploymentfreeze_id=freeze_deployment_freeze.id,
        project_id=data["octopusdeploy_projects"]["second_project"]["projects"][0]["id"],
        environment_ids=[data["octopusdeploy_environments"]["default_environment"]["environments"][0]["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Deployment freeze
    		freezeDeploymentFreeze, err := octopusdeploy.NewDeploymentFreeze(ctx, "freezeDeploymentFreeze", &octopusdeploy.DeploymentFreezeArgs{
    			Start: pulumi.String("2024-12-25T00:00:00+10:00"),
    			End:   pulumi.String("2024-12-27T00:00:00+08:00"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = octopusdeploy.NewDeploymentFreezeProject(ctx, "projectFreezeDeploymentFreezeProject", &octopusdeploy.DeploymentFreezeProjectArgs{
    			DeploymentfreezeId: freezeDeploymentFreeze.ID(),
    			ProjectId:          pulumi.String("Projects-123"),
    			EnvironmentIds: pulumi.StringArray{
    				pulumi.String("Environments-123"),
    				pulumi.String("Environments-456"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Freeze with ids sourced from resources and data sources.
    		// Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
    		_, err = octopusdeploy.NewDeploymentFreeze(ctx, "freezeIndex/deploymentFreezeDeploymentFreeze", &octopusdeploy.DeploymentFreezeArgs{
    			Start: pulumi.String("2025-06-30T00:00:00+10:00"),
    			End:   pulumi.String("2025-07-02T00:00:00+10:00"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = octopusdeploy.NewDeploymentFreezeProject(ctx, "projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject", &octopusdeploy.DeploymentFreezeProjectArgs{
    			DeploymentfreezeId: freezeDeploymentFreeze.ID(),
    			ProjectId:          pulumi.Any(resource.Octopusdeploy_project.Project1.Id),
    			EnvironmentIds: pulumi.StringArray{
    				resource.Octopusdeploy_environment.Production.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = octopusdeploy.NewDeploymentFreezeProject(ctx, "projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject", &octopusdeploy.DeploymentFreezeProjectArgs{
    			DeploymentfreezeId: freezeDeploymentFreeze.ID(),
    			ProjectId:          pulumi.Any(data.Octopusdeploy_projects.Second_project.Projects[0].Id),
    			EnvironmentIds: pulumi.StringArray{
    				data.Octopusdeploy_environments.Default_environment.Environments[0].Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Octopusdeploy = Pulumi.Octopusdeploy;
    
    return await Deployment.RunAsync(() => 
    {
        // Deployment freeze
        var freezeDeploymentFreeze = new Octopusdeploy.DeploymentFreeze("freezeDeploymentFreeze", new()
        {
            Start = "2024-12-25T00:00:00+10:00",
            End = "2024-12-27T00:00:00+08:00",
        });
    
        var projectFreezeDeploymentFreezeProject = new Octopusdeploy.DeploymentFreezeProject("projectFreezeDeploymentFreezeProject", new()
        {
            DeploymentfreezeId = freezeDeploymentFreeze.Id,
            ProjectId = "Projects-123",
            EnvironmentIds = new[]
            {
                "Environments-123",
                "Environments-456",
            },
        });
    
        // Freeze with ids sourced from resources and data sources. 
        // Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
        var freezeIndex_deploymentFreezeDeploymentFreeze = new Octopusdeploy.DeploymentFreeze("freezeIndex/deploymentFreezeDeploymentFreeze", new()
        {
            Start = "2025-06-30T00:00:00+10:00",
            End = "2025-07-02T00:00:00+10:00",
        });
    
        var projectFreezeIndex_deploymentFreezeProjectDeploymentFreezeProject = new Octopusdeploy.DeploymentFreezeProject("projectFreezeIndex/deploymentFreezeProjectDeploymentFreezeProject", new()
        {
            DeploymentfreezeId = freezeDeploymentFreeze.Id,
            ProjectId = resource.Octopusdeploy_project.Project1.Id,
            EnvironmentIds = new[]
            {
                resource.Octopusdeploy_environment.Production.Id,
            },
        });
    
        var projectFreezeOctopusdeployIndex_deploymentFreezeProjectDeploymentFreezeProject = new Octopusdeploy.DeploymentFreezeProject("projectFreezeOctopusdeployIndex/deploymentFreezeProjectDeploymentFreezeProject", new()
        {
            DeploymentfreezeId = freezeDeploymentFreeze.Id,
            ProjectId = data.Octopusdeploy_projects.Second_project.Projects[0].Id,
            EnvironmentIds = new[]
            {
                data.Octopusdeploy_environments.Default_environment.Environments[0].Id,
            },
        });
    
    });
    
    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.DeploymentFreezeProject;
    import com.pulumi.octopusdeploy.DeploymentFreezeProjectArgs;
    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) {
            // Deployment freeze
            var freezeDeploymentFreeze = new DeploymentFreeze("freezeDeploymentFreeze", DeploymentFreezeArgs.builder()
                .start("2024-12-25T00:00:00+10:00")
                .end("2024-12-27T00:00:00+08:00")
                .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 data sources. 
            // Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
            var freezeIndex_deploymentFreezeDeploymentFreeze = new DeploymentFreeze("freezeIndex/deploymentFreezeDeploymentFreeze", 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());
    
        }
    }
    
    resources:
      # Deployment freeze
      freezeDeploymentFreeze:
        type: octopusdeploy:DeploymentFreeze
        properties:
          start: 2024-12-25T00:00:00+10:00
          end: 2024-12-27T00:00:00+08:00
      projectFreezeDeploymentFreezeProject:
        type: octopusdeploy:DeploymentFreezeProject
        properties:
          deploymentfreezeId: ${freezeDeploymentFreeze.id}
          projectId: Projects-123
          environmentIds:
            - Environments-123
            - Environments-456
      # Freeze with ids sourced from resources and data sources. 
      # Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
      freezeIndex/deploymentFreezeDeploymentFreeze:
        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}
    

    Create DeploymentFreezeProject Resource

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

    Constructor syntax

    new DeploymentFreezeProject(name: string, args: DeploymentFreezeProjectArgs, opts?: CustomResourceOptions);
    @overload
    def DeploymentFreezeProject(resource_name: str,
                                args: DeploymentFreezeProjectArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def DeploymentFreezeProject(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                deploymentfreeze_id: Optional[str] = None,
                                project_id: Optional[str] = None,
                                environment_ids: Optional[Sequence[str]] = None)
    func NewDeploymentFreezeProject(ctx *Context, name string, args DeploymentFreezeProjectArgs, opts ...ResourceOption) (*DeploymentFreezeProject, error)
    public DeploymentFreezeProject(string name, DeploymentFreezeProjectArgs args, CustomResourceOptions? opts = null)
    public DeploymentFreezeProject(String name, DeploymentFreezeProjectArgs args)
    public DeploymentFreezeProject(String name, DeploymentFreezeProjectArgs args, CustomResourceOptions options)
    
    type: octopusdeploy:DeploymentFreezeProject
    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 DeploymentFreezeProjectArgs
    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 DeploymentFreezeProjectArgs
    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 DeploymentFreezeProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DeploymentFreezeProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DeploymentFreezeProjectArgs
    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 deploymentFreezeProjectResource = new Octopusdeploy.DeploymentFreezeProject("deploymentFreezeProjectResource", new()
    {
        DeploymentfreezeId = "string",
        ProjectId = "string",
        EnvironmentIds = new[]
        {
            "string",
        },
    });
    
    example, err := octopusdeploy.NewDeploymentFreezeProject(ctx, "deploymentFreezeProjectResource", &octopusdeploy.DeploymentFreezeProjectArgs{
    	DeploymentfreezeId: pulumi.String("string"),
    	ProjectId:          pulumi.String("string"),
    	EnvironmentIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var deploymentFreezeProjectResource = new DeploymentFreezeProject("deploymentFreezeProjectResource", DeploymentFreezeProjectArgs.builder()
        .deploymentfreezeId("string")
        .projectId("string")
        .environmentIds("string")
        .build());
    
    deployment_freeze_project_resource = octopusdeploy.DeploymentFreezeProject("deploymentFreezeProjectResource",
        deploymentfreeze_id="string",
        project_id="string",
        environment_ids=["string"])
    
    const deploymentFreezeProjectResource = new octopusdeploy.DeploymentFreezeProject("deploymentFreezeProjectResource", {
        deploymentfreezeId: "string",
        projectId: "string",
        environmentIds: ["string"],
    });
    
    type: octopusdeploy:DeploymentFreezeProject
    properties:
        deploymentfreezeId: string
        environmentIds:
            - string
        projectId: string
    

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

    DeploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    ProjectId string
    The project ID associated with this freeze scope.
    EnvironmentIds List<string>
    The environment IDs associated with this project deployment freeze scope.
    DeploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    ProjectId string
    The project ID associated with this freeze scope.
    EnvironmentIds []string
    The environment IDs associated with this project deployment freeze scope.
    deploymentfreezeId String
    The deployment freeze ID associated with this freeze scope.
    projectId String
    The project ID associated with this freeze scope.
    environmentIds List<String>
    The environment IDs associated with this project deployment freeze scope.
    deploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    projectId string
    The project ID associated with this freeze scope.
    environmentIds string[]
    The environment IDs associated with this project deployment freeze scope.
    deploymentfreeze_id str
    The deployment freeze ID associated with this freeze scope.
    project_id str
    The project ID associated with this freeze scope.
    environment_ids Sequence[str]
    The environment IDs associated with this project deployment freeze scope.
    deploymentfreezeId String
    The deployment freeze ID associated with this freeze scope.
    projectId String
    The project ID associated with this freeze scope.
    environmentIds List<String>
    The environment IDs associated with this project deployment freeze scope.

    Outputs

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

    Get an existing DeploymentFreezeProject 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?: DeploymentFreezeProjectState, opts?: CustomResourceOptions): DeploymentFreezeProject
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            deploymentfreeze_id: Optional[str] = None,
            environment_ids: Optional[Sequence[str]] = None,
            project_id: Optional[str] = None) -> DeploymentFreezeProject
    func GetDeploymentFreezeProject(ctx *Context, name string, id IDInput, state *DeploymentFreezeProjectState, opts ...ResourceOption) (*DeploymentFreezeProject, error)
    public static DeploymentFreezeProject Get(string name, Input<string> id, DeploymentFreezeProjectState? state, CustomResourceOptions? opts = null)
    public static DeploymentFreezeProject get(String name, Output<String> id, DeploymentFreezeProjectState state, CustomResourceOptions options)
    resources:  _:    type: octopusdeploy:DeploymentFreezeProject    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:
    DeploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    EnvironmentIds List<string>
    The environment IDs associated with this project deployment freeze scope.
    ProjectId string
    The project ID associated with this freeze scope.
    DeploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    EnvironmentIds []string
    The environment IDs associated with this project deployment freeze scope.
    ProjectId string
    The project ID associated with this freeze scope.
    deploymentfreezeId String
    The deployment freeze ID associated with this freeze scope.
    environmentIds List<String>
    The environment IDs associated with this project deployment freeze scope.
    projectId String
    The project ID associated with this freeze scope.
    deploymentfreezeId string
    The deployment freeze ID associated with this freeze scope.
    environmentIds string[]
    The environment IDs associated with this project deployment freeze scope.
    projectId string
    The project ID associated with this freeze scope.
    deploymentfreeze_id str
    The deployment freeze ID associated with this freeze scope.
    environment_ids Sequence[str]
    The environment IDs associated with this project deployment freeze scope.
    project_id str
    The project ID associated with this freeze scope.
    deploymentfreezeId String
    The deployment freeze ID associated with this freeze scope.
    environmentIds List<String>
    The environment IDs associated with this project deployment freeze scope.
    projectId String
    The project ID associated with this freeze scope.

    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.2 published on Friday, May 30, 2025 by octopusdeploylabs