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

octopusdeploy.Lifecycle

Explore with Pulumi AI

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

    This resource manages lifecycles in Octopus Deploy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as octopusdeploy from "@pulumi/octopusdeploy";
    
    const example = new octopusdeploy.Lifecycle("example", {
        description: "This is the default lifecycle.",
        phases: [
            {
                automaticDeploymentTargets: ["Environments-321"],
                name: "foo",
                releaseRetentionPolicies: [{
                    quantityToKeep: 1,
                    shouldKeepForever: false,
                    unit: "Days",
                }],
                tentacleRetentionPolicies: [{
                    quantityToKeep: 30,
                    shouldKeepForever: false,
                    unit: "Items",
                }],
            },
            {
                isOptionalPhase: true,
                name: "bar",
                optionalDeploymentTargets: ["Environments-321"],
            },
        ],
        releaseRetentionPolicies: [{
            quantityToKeep: 0,
            shouldKeepForever: true,
            unit: "Days",
        }],
        tentacleRetentionPolicies: [{
            quantityToKeep: 30,
            shouldKeepForever: false,
            unit: "Items",
        }],
    });
    
    import pulumi
    import pulumi_octopusdeploy as octopusdeploy
    
    example = octopusdeploy.Lifecycle("example",
        description="This is the default lifecycle.",
        phases=[
            {
                "automatic_deployment_targets": ["Environments-321"],
                "name": "foo",
                "release_retention_policies": [{
                    "quantity_to_keep": 1,
                    "should_keep_forever": False,
                    "unit": "Days",
                }],
                "tentacle_retention_policies": [{
                    "quantity_to_keep": 30,
                    "should_keep_forever": False,
                    "unit": "Items",
                }],
            },
            {
                "is_optional_phase": True,
                "name": "bar",
                "optional_deployment_targets": ["Environments-321"],
            },
        ],
        release_retention_policies=[{
            "quantity_to_keep": 0,
            "should_keep_forever": True,
            "unit": "Days",
        }],
        tentacle_retention_policies=[{
            "quantity_to_keep": 30,
            "should_keep_forever": False,
            "unit": "Items",
        }])
    
    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 {
    		_, err := octopusdeploy.NewLifecycle(ctx, "example", &octopusdeploy.LifecycleArgs{
    			Description: pulumi.String("This is the default lifecycle."),
    			Phases: octopusdeploy.LifecyclePhaseArray{
    				&octopusdeploy.LifecyclePhaseArgs{
    					AutomaticDeploymentTargets: pulumi.StringArray{
    						pulumi.String("Environments-321"),
    					},
    					Name: pulumi.String("foo"),
    					ReleaseRetentionPolicies: octopusdeploy.LifecyclePhaseReleaseRetentionPolicyArray{
    						&octopusdeploy.LifecyclePhaseReleaseRetentionPolicyArgs{
    							QuantityToKeep:    pulumi.Float64(1),
    							ShouldKeepForever: pulumi.Bool(false),
    							Unit:              pulumi.String("Days"),
    						},
    					},
    					TentacleRetentionPolicies: octopusdeploy.LifecyclePhaseTentacleRetentionPolicyArray{
    						&octopusdeploy.LifecyclePhaseTentacleRetentionPolicyArgs{
    							QuantityToKeep:    pulumi.Float64(30),
    							ShouldKeepForever: pulumi.Bool(false),
    							Unit:              pulumi.String("Items"),
    						},
    					},
    				},
    				&octopusdeploy.LifecyclePhaseArgs{
    					IsOptionalPhase: pulumi.Bool(true),
    					Name:            pulumi.String("bar"),
    					OptionalDeploymentTargets: pulumi.StringArray{
    						pulumi.String("Environments-321"),
    					},
    				},
    			},
    			ReleaseRetentionPolicies: octopusdeploy.LifecycleReleaseRetentionPolicyArray{
    				&octopusdeploy.LifecycleReleaseRetentionPolicyArgs{
    					QuantityToKeep:    pulumi.Float64(0),
    					ShouldKeepForever: pulumi.Bool(true),
    					Unit:              pulumi.String("Days"),
    				},
    			},
    			TentacleRetentionPolicies: octopusdeploy.LifecycleTentacleRetentionPolicyArray{
    				&octopusdeploy.LifecycleTentacleRetentionPolicyArgs{
    					QuantityToKeep:    pulumi.Float64(30),
    					ShouldKeepForever: pulumi.Bool(false),
    					Unit:              pulumi.String("Items"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Octopusdeploy = Pulumi.Octopusdeploy;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Octopusdeploy.Lifecycle("example", new()
        {
            Description = "This is the default lifecycle.",
            Phases = new[]
            {
                new Octopusdeploy.Inputs.LifecyclePhaseArgs
                {
                    AutomaticDeploymentTargets = new[]
                    {
                        "Environments-321",
                    },
                    Name = "foo",
                    ReleaseRetentionPolicies = new[]
                    {
                        new Octopusdeploy.Inputs.LifecyclePhaseReleaseRetentionPolicyArgs
                        {
                            QuantityToKeep = 1,
                            ShouldKeepForever = false,
                            Unit = "Days",
                        },
                    },
                    TentacleRetentionPolicies = new[]
                    {
                        new Octopusdeploy.Inputs.LifecyclePhaseTentacleRetentionPolicyArgs
                        {
                            QuantityToKeep = 30,
                            ShouldKeepForever = false,
                            Unit = "Items",
                        },
                    },
                },
                new Octopusdeploy.Inputs.LifecyclePhaseArgs
                {
                    IsOptionalPhase = true,
                    Name = "bar",
                    OptionalDeploymentTargets = new[]
                    {
                        "Environments-321",
                    },
                },
            },
            ReleaseRetentionPolicies = new[]
            {
                new Octopusdeploy.Inputs.LifecycleReleaseRetentionPolicyArgs
                {
                    QuantityToKeep = 0,
                    ShouldKeepForever = true,
                    Unit = "Days",
                },
            },
            TentacleRetentionPolicies = new[]
            {
                new Octopusdeploy.Inputs.LifecycleTentacleRetentionPolicyArgs
                {
                    QuantityToKeep = 30,
                    ShouldKeepForever = false,
                    Unit = "Items",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.octopusdeploy.Lifecycle;
    import com.pulumi.octopusdeploy.LifecycleArgs;
    import com.pulumi.octopusdeploy.inputs.LifecyclePhaseArgs;
    import com.pulumi.octopusdeploy.inputs.LifecycleReleaseRetentionPolicyArgs;
    import com.pulumi.octopusdeploy.inputs.LifecycleTentacleRetentionPolicyArgs;
    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) {
            var example = new Lifecycle("example", LifecycleArgs.builder()
                .description("This is the default lifecycle.")
                .phases(            
                    LifecyclePhaseArgs.builder()
                        .automaticDeploymentTargets("Environments-321")
                        .name("foo")
                        .releaseRetentionPolicies(LifecyclePhaseReleaseRetentionPolicyArgs.builder()
                            .quantityToKeep(1)
                            .shouldKeepForever(false)
                            .unit("Days")
                            .build())
                        .tentacleRetentionPolicies(LifecyclePhaseTentacleRetentionPolicyArgs.builder()
                            .quantityToKeep(30)
                            .shouldKeepForever(false)
                            .unit("Items")
                            .build())
                        .build(),
                    LifecyclePhaseArgs.builder()
                        .isOptionalPhase(true)
                        .name("bar")
                        .optionalDeploymentTargets("Environments-321")
                        .build())
                .releaseRetentionPolicies(LifecycleReleaseRetentionPolicyArgs.builder()
                    .quantityToKeep(0)
                    .shouldKeepForever(true)
                    .unit("Days")
                    .build())
                .tentacleRetentionPolicies(LifecycleTentacleRetentionPolicyArgs.builder()
                    .quantityToKeep(30)
                    .shouldKeepForever(false)
                    .unit("Items")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: octopusdeploy:Lifecycle
        properties:
          description: This is the default lifecycle.
          phases:
            - automaticDeploymentTargets:
                - Environments-321
              name: foo
              releaseRetentionPolicies:
                - quantityToKeep: 1
                  shouldKeepForever: false
                  unit: Days
              tentacleRetentionPolicies:
                - quantityToKeep: 30
                  shouldKeepForever: false
                  unit: Items
            - isOptionalPhase: true
              name: bar
              optionalDeploymentTargets:
                - Environments-321
          releaseRetentionPolicies:
            - quantityToKeep: 0
              shouldKeepForever: true
              unit: Days
          tentacleRetentionPolicies:
            - quantityToKeep: 30
              shouldKeepForever: false
              unit: Items
    

    Create Lifecycle Resource

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

    Constructor syntax

    new Lifecycle(name: string, args?: LifecycleArgs, opts?: CustomResourceOptions);
    @overload
    def Lifecycle(resource_name: str,
                  args: Optional[LifecycleArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Lifecycle(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  phases: Optional[Sequence[LifecyclePhaseArgs]] = None,
                  release_retention_policies: Optional[Sequence[LifecycleReleaseRetentionPolicyArgs]] = None,
                  space_id: Optional[str] = None,
                  tentacle_retention_policies: Optional[Sequence[LifecycleTentacleRetentionPolicyArgs]] = None)
    func NewLifecycle(ctx *Context, name string, args *LifecycleArgs, opts ...ResourceOption) (*Lifecycle, error)
    public Lifecycle(string name, LifecycleArgs? args = null, CustomResourceOptions? opts = null)
    public Lifecycle(String name, LifecycleArgs args)
    public Lifecycle(String name, LifecycleArgs args, CustomResourceOptions options)
    
    type: octopusdeploy:Lifecycle
    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 LifecycleArgs
    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 LifecycleArgs
    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 LifecycleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LifecycleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LifecycleArgs
    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 lifecycleResource = new Octopusdeploy.Lifecycle("lifecycleResource", new()
    {
        Description = "string",
        Name = "string",
        Phases = new[]
        {
            new Octopusdeploy.Inputs.LifecyclePhaseArgs
            {
                Name = "string",
                AutomaticDeploymentTargets = new[]
                {
                    "string",
                },
                Id = "string",
                IsOptionalPhase = false,
                IsPriorityPhase = false,
                MinimumEnvironmentsBeforePromotion = 0,
                OptionalDeploymentTargets = new[]
                {
                    "string",
                },
                ReleaseRetentionPolicies = new[]
                {
                    new Octopusdeploy.Inputs.LifecyclePhaseReleaseRetentionPolicyArgs
                    {
                        QuantityToKeep = 0,
                        ShouldKeepForever = false,
                        Unit = "string",
                    },
                },
                TentacleRetentionPolicies = new[]
                {
                    new Octopusdeploy.Inputs.LifecyclePhaseTentacleRetentionPolicyArgs
                    {
                        QuantityToKeep = 0,
                        ShouldKeepForever = false,
                        Unit = "string",
                    },
                },
            },
        },
        ReleaseRetentionPolicies = new[]
        {
            new Octopusdeploy.Inputs.LifecycleReleaseRetentionPolicyArgs
            {
                QuantityToKeep = 0,
                ShouldKeepForever = false,
                Unit = "string",
            },
        },
        SpaceId = "string",
        TentacleRetentionPolicies = new[]
        {
            new Octopusdeploy.Inputs.LifecycleTentacleRetentionPolicyArgs
            {
                QuantityToKeep = 0,
                ShouldKeepForever = false,
                Unit = "string",
            },
        },
    });
    
    example, err := octopusdeploy.NewLifecycle(ctx, "lifecycleResource", &octopusdeploy.LifecycleArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Phases: octopusdeploy.LifecyclePhaseArray{
    		&octopusdeploy.LifecyclePhaseArgs{
    			Name: pulumi.String("string"),
    			AutomaticDeploymentTargets: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Id:                                 pulumi.String("string"),
    			IsOptionalPhase:                    pulumi.Bool(false),
    			IsPriorityPhase:                    pulumi.Bool(false),
    			MinimumEnvironmentsBeforePromotion: pulumi.Float64(0),
    			OptionalDeploymentTargets: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			ReleaseRetentionPolicies: octopusdeploy.LifecyclePhaseReleaseRetentionPolicyArray{
    				&octopusdeploy.LifecyclePhaseReleaseRetentionPolicyArgs{
    					QuantityToKeep:    pulumi.Float64(0),
    					ShouldKeepForever: pulumi.Bool(false),
    					Unit:              pulumi.String("string"),
    				},
    			},
    			TentacleRetentionPolicies: octopusdeploy.LifecyclePhaseTentacleRetentionPolicyArray{
    				&octopusdeploy.LifecyclePhaseTentacleRetentionPolicyArgs{
    					QuantityToKeep:    pulumi.Float64(0),
    					ShouldKeepForever: pulumi.Bool(false),
    					Unit:              pulumi.String("string"),
    				},
    			},
    		},
    	},
    	ReleaseRetentionPolicies: octopusdeploy.LifecycleReleaseRetentionPolicyArray{
    		&octopusdeploy.LifecycleReleaseRetentionPolicyArgs{
    			QuantityToKeep:    pulumi.Float64(0),
    			ShouldKeepForever: pulumi.Bool(false),
    			Unit:              pulumi.String("string"),
    		},
    	},
    	SpaceId: pulumi.String("string"),
    	TentacleRetentionPolicies: octopusdeploy.LifecycleTentacleRetentionPolicyArray{
    		&octopusdeploy.LifecycleTentacleRetentionPolicyArgs{
    			QuantityToKeep:    pulumi.Float64(0),
    			ShouldKeepForever: pulumi.Bool(false),
    			Unit:              pulumi.String("string"),
    		},
    	},
    })
    
    var lifecycleResource = new Lifecycle("lifecycleResource", LifecycleArgs.builder()
        .description("string")
        .name("string")
        .phases(LifecyclePhaseArgs.builder()
            .name("string")
            .automaticDeploymentTargets("string")
            .id("string")
            .isOptionalPhase(false)
            .isPriorityPhase(false)
            .minimumEnvironmentsBeforePromotion(0)
            .optionalDeploymentTargets("string")
            .releaseRetentionPolicies(LifecyclePhaseReleaseRetentionPolicyArgs.builder()
                .quantityToKeep(0)
                .shouldKeepForever(false)
                .unit("string")
                .build())
            .tentacleRetentionPolicies(LifecyclePhaseTentacleRetentionPolicyArgs.builder()
                .quantityToKeep(0)
                .shouldKeepForever(false)
                .unit("string")
                .build())
            .build())
        .releaseRetentionPolicies(LifecycleReleaseRetentionPolicyArgs.builder()
            .quantityToKeep(0)
            .shouldKeepForever(false)
            .unit("string")
            .build())
        .spaceId("string")
        .tentacleRetentionPolicies(LifecycleTentacleRetentionPolicyArgs.builder()
            .quantityToKeep(0)
            .shouldKeepForever(false)
            .unit("string")
            .build())
        .build());
    
    lifecycle_resource = octopusdeploy.Lifecycle("lifecycleResource",
        description="string",
        name="string",
        phases=[{
            "name": "string",
            "automatic_deployment_targets": ["string"],
            "id": "string",
            "is_optional_phase": False,
            "is_priority_phase": False,
            "minimum_environments_before_promotion": 0,
            "optional_deployment_targets": ["string"],
            "release_retention_policies": [{
                "quantity_to_keep": 0,
                "should_keep_forever": False,
                "unit": "string",
            }],
            "tentacle_retention_policies": [{
                "quantity_to_keep": 0,
                "should_keep_forever": False,
                "unit": "string",
            }],
        }],
        release_retention_policies=[{
            "quantity_to_keep": 0,
            "should_keep_forever": False,
            "unit": "string",
        }],
        space_id="string",
        tentacle_retention_policies=[{
            "quantity_to_keep": 0,
            "should_keep_forever": False,
            "unit": "string",
        }])
    
    const lifecycleResource = new octopusdeploy.Lifecycle("lifecycleResource", {
        description: "string",
        name: "string",
        phases: [{
            name: "string",
            automaticDeploymentTargets: ["string"],
            id: "string",
            isOptionalPhase: false,
            isPriorityPhase: false,
            minimumEnvironmentsBeforePromotion: 0,
            optionalDeploymentTargets: ["string"],
            releaseRetentionPolicies: [{
                quantityToKeep: 0,
                shouldKeepForever: false,
                unit: "string",
            }],
            tentacleRetentionPolicies: [{
                quantityToKeep: 0,
                shouldKeepForever: false,
                unit: "string",
            }],
        }],
        releaseRetentionPolicies: [{
            quantityToKeep: 0,
            shouldKeepForever: false,
            unit: "string",
        }],
        spaceId: "string",
        tentacleRetentionPolicies: [{
            quantityToKeep: 0,
            shouldKeepForever: false,
            unit: "string",
        }],
    });
    
    type: octopusdeploy:Lifecycle
    properties:
        description: string
        name: string
        phases:
            - automaticDeploymentTargets:
                - string
              id: string
              isOptionalPhase: false
              isPriorityPhase: false
              minimumEnvironmentsBeforePromotion: 0
              name: string
              optionalDeploymentTargets:
                - string
              releaseRetentionPolicies:
                - quantityToKeep: 0
                  shouldKeepForever: false
                  unit: string
              tentacleRetentionPolicies:
                - quantityToKeep: 0
                  shouldKeepForever: false
                  unit: string
        releaseRetentionPolicies:
            - quantityToKeep: 0
              shouldKeepForever: false
              unit: string
        spaceId: string
        tentacleRetentionPolicies:
            - quantityToKeep: 0
              shouldKeepForever: false
              unit: string
    

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

    Description string
    The description of this lifecycle.
    Name string
    The name of this resource.
    Phases List<LifecyclePhase>
    Defines a phase in the lifecycle.
    ReleaseRetentionPolicies List<LifecycleReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    SpaceId string
    The space ID associated with this resource.
    TentacleRetentionPolicies List<LifecycleTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    Description string
    The description of this lifecycle.
    Name string
    The name of this resource.
    Phases []LifecyclePhaseArgs
    Defines a phase in the lifecycle.
    ReleaseRetentionPolicies []LifecycleReleaseRetentionPolicyArgs
    Defines the retention policy for releases or tentacles.
    SpaceId string
    The space ID associated with this resource.
    TentacleRetentionPolicies []LifecycleTentacleRetentionPolicyArgs
    Defines the retention policy for releases or tentacles.
    description String
    The description of this lifecycle.
    name String
    The name of this resource.
    phases List<LifecyclePhase>
    Defines a phase in the lifecycle.
    releaseRetentionPolicies List<LifecycleReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    spaceId String
    The space ID associated with this resource.
    tentacleRetentionPolicies List<LifecycleTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    description string
    The description of this lifecycle.
    name string
    The name of this resource.
    phases LifecyclePhase[]
    Defines a phase in the lifecycle.
    releaseRetentionPolicies LifecycleReleaseRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    spaceId string
    The space ID associated with this resource.
    tentacleRetentionPolicies LifecycleTentacleRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    description str
    The description of this lifecycle.
    name str
    The name of this resource.
    phases Sequence[LifecyclePhaseArgs]
    Defines a phase in the lifecycle.
    release_retention_policies Sequence[LifecycleReleaseRetentionPolicyArgs]
    Defines the retention policy for releases or tentacles.
    space_id str
    The space ID associated with this resource.
    tentacle_retention_policies Sequence[LifecycleTentacleRetentionPolicyArgs]
    Defines the retention policy for releases or tentacles.
    description String
    The description of this lifecycle.
    name String
    The name of this resource.
    phases List<Property Map>
    Defines a phase in the lifecycle.
    releaseRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.
    spaceId String
    The space ID associated with this resource.
    tentacleRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.

    Outputs

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

    Get an existing Lifecycle 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?: LifecycleState, opts?: CustomResourceOptions): Lifecycle
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            phases: Optional[Sequence[LifecyclePhaseArgs]] = None,
            release_retention_policies: Optional[Sequence[LifecycleReleaseRetentionPolicyArgs]] = None,
            space_id: Optional[str] = None,
            tentacle_retention_policies: Optional[Sequence[LifecycleTentacleRetentionPolicyArgs]] = None) -> Lifecycle
    func GetLifecycle(ctx *Context, name string, id IDInput, state *LifecycleState, opts ...ResourceOption) (*Lifecycle, error)
    public static Lifecycle Get(string name, Input<string> id, LifecycleState? state, CustomResourceOptions? opts = null)
    public static Lifecycle get(String name, Output<String> id, LifecycleState state, CustomResourceOptions options)
    resources:  _:    type: octopusdeploy:Lifecycle    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:
    Description string
    The description of this lifecycle.
    Name string
    The name of this resource.
    Phases List<LifecyclePhase>
    Defines a phase in the lifecycle.
    ReleaseRetentionPolicies List<LifecycleReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    SpaceId string
    The space ID associated with this resource.
    TentacleRetentionPolicies List<LifecycleTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    Description string
    The description of this lifecycle.
    Name string
    The name of this resource.
    Phases []LifecyclePhaseArgs
    Defines a phase in the lifecycle.
    ReleaseRetentionPolicies []LifecycleReleaseRetentionPolicyArgs
    Defines the retention policy for releases or tentacles.
    SpaceId string
    The space ID associated with this resource.
    TentacleRetentionPolicies []LifecycleTentacleRetentionPolicyArgs
    Defines the retention policy for releases or tentacles.
    description String
    The description of this lifecycle.
    name String
    The name of this resource.
    phases List<LifecyclePhase>
    Defines a phase in the lifecycle.
    releaseRetentionPolicies List<LifecycleReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    spaceId String
    The space ID associated with this resource.
    tentacleRetentionPolicies List<LifecycleTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    description string
    The description of this lifecycle.
    name string
    The name of this resource.
    phases LifecyclePhase[]
    Defines a phase in the lifecycle.
    releaseRetentionPolicies LifecycleReleaseRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    spaceId string
    The space ID associated with this resource.
    tentacleRetentionPolicies LifecycleTentacleRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    description str
    The description of this lifecycle.
    name str
    The name of this resource.
    phases Sequence[LifecyclePhaseArgs]
    Defines a phase in the lifecycle.
    release_retention_policies Sequence[LifecycleReleaseRetentionPolicyArgs]
    Defines the retention policy for releases or tentacles.
    space_id str
    The space ID associated with this resource.
    tentacle_retention_policies Sequence[LifecycleTentacleRetentionPolicyArgs]
    Defines the retention policy for releases or tentacles.
    description String
    The description of this lifecycle.
    name String
    The name of this resource.
    phases List<Property Map>
    Defines a phase in the lifecycle.
    releaseRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.
    spaceId String
    The space ID associated with this resource.
    tentacleRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.

    Supporting Types

    LifecyclePhase, LifecyclePhaseArgs

    Name string
    The name of this resource.
    AutomaticDeploymentTargets List<string>
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    Id string
    The unique ID for this resource.
    IsOptionalPhase bool
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    IsPriorityPhase bool
    Deployments will be prioritized in this phase
    MinimumEnvironmentsBeforePromotion double
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    OptionalDeploymentTargets List<string>
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    ReleaseRetentionPolicies List<LifecyclePhaseReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    TentacleRetentionPolicies List<LifecyclePhaseTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    Name string
    The name of this resource.
    AutomaticDeploymentTargets []string
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    Id string
    The unique ID for this resource.
    IsOptionalPhase bool
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    IsPriorityPhase bool
    Deployments will be prioritized in this phase
    MinimumEnvironmentsBeforePromotion float64
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    OptionalDeploymentTargets []string
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    ReleaseRetentionPolicies []LifecyclePhaseReleaseRetentionPolicy
    Defines the retention policy for releases or tentacles.
    TentacleRetentionPolicies []LifecyclePhaseTentacleRetentionPolicy
    Defines the retention policy for releases or tentacles.
    name String
    The name of this resource.
    automaticDeploymentTargets List<String>
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    id String
    The unique ID for this resource.
    isOptionalPhase Boolean
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    isPriorityPhase Boolean
    Deployments will be prioritized in this phase
    minimumEnvironmentsBeforePromotion Double
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    optionalDeploymentTargets List<String>
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    releaseRetentionPolicies List<LifecyclePhaseReleaseRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    tentacleRetentionPolicies List<LifecyclePhaseTentacleRetentionPolicy>
    Defines the retention policy for releases or tentacles.
    name string
    The name of this resource.
    automaticDeploymentTargets string[]
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    id string
    The unique ID for this resource.
    isOptionalPhase boolean
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    isPriorityPhase boolean
    Deployments will be prioritized in this phase
    minimumEnvironmentsBeforePromotion number
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    optionalDeploymentTargets string[]
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    releaseRetentionPolicies LifecyclePhaseReleaseRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    tentacleRetentionPolicies LifecyclePhaseTentacleRetentionPolicy[]
    Defines the retention policy for releases or tentacles.
    name str
    The name of this resource.
    automatic_deployment_targets Sequence[str]
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    id str
    The unique ID for this resource.
    is_optional_phase bool
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    is_priority_phase bool
    Deployments will be prioritized in this phase
    minimum_environments_before_promotion float
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    optional_deployment_targets Sequence[str]
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    release_retention_policies Sequence[LifecyclePhaseReleaseRetentionPolicy]
    Defines the retention policy for releases or tentacles.
    tentacle_retention_policies Sequence[LifecyclePhaseTentacleRetentionPolicy]
    Defines the retention policy for releases or tentacles.
    name String
    The name of this resource.
    automaticDeploymentTargets List<String>
    Environment IDs in this phase that a release is automatically deployed to when it is eligible for this phase
    id String
    The unique ID for this resource.
    isOptionalPhase Boolean
    If false a release must be deployed to this phase before it can be deployed to the next phase.
    isPriorityPhase Boolean
    Deployments will be prioritized in this phase
    minimumEnvironmentsBeforePromotion Number
    The number of units required before a release can enter the next phase. If 0, all environments are required.
    optionalDeploymentTargets List<String>
    Environment IDs in this phase that a release can be deployed to, but is not automatically deployed to
    releaseRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.
    tentacleRetentionPolicies List<Property Map>
    Defines the retention policy for releases or tentacles.

    LifecyclePhaseReleaseRetentionPolicy, LifecyclePhaseReleaseRetentionPolicyArgs

    QuantityToKeep double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    QuantityToKeep float64
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever boolean
    Indicates if items should never be deleted. The default value is false.
    unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantity_to_keep float
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    should_keep_forever bool
    Indicates if items should never be deleted. The default value is false.
    unit str
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.

    LifecyclePhaseTentacleRetentionPolicy, LifecyclePhaseTentacleRetentionPolicyArgs

    QuantityToKeep double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    QuantityToKeep float64
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever boolean
    Indicates if items should never be deleted. The default value is false.
    unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantity_to_keep float
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    should_keep_forever bool
    Indicates if items should never be deleted. The default value is false.
    unit str
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.

    LifecycleReleaseRetentionPolicy, LifecycleReleaseRetentionPolicyArgs

    QuantityToKeep double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    QuantityToKeep float64
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever boolean
    Indicates if items should never be deleted. The default value is false.
    unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantity_to_keep float
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    should_keep_forever bool
    Indicates if items should never be deleted. The default value is false.
    unit str
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.

    LifecycleTentacleRetentionPolicy, LifecycleTentacleRetentionPolicyArgs

    QuantityToKeep double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    QuantityToKeep float64
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    ShouldKeepForever bool
    Indicates if items should never be deleted. The default value is false.
    Unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Double
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever boolean
    Indicates if items should never be deleted. The default value is false.
    unit string
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantity_to_keep float
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    should_keep_forever bool
    Indicates if items should never be deleted. The default value is false.
    unit str
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.
    quantityToKeep Number
    The number of days/releases to keep. The default value is 30. If 0 then all are kept.
    shouldKeepForever Boolean
    Indicates if items should never be deleted. The default value is false.
    unit String
    The unit of quantity to keep. Valid units are Days or Items. The default value is Days.

    Import

    $ pulumi import octopusdeploy:index/lifecycle:Lifecycle [options] octopusdeploy_lifecycle.<name> <lifecycle-id>
    

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

    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