1. Packages
  2. Octopusdeploy Provider
  3. API Docs
  4. Runbook
octopusdeploy 0.43.0 published on Thursday, Apr 17, 2025 by octopusdeploylabs

octopusdeploy.Runbook

Explore with Pulumi AI

Create Runbook Resource

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

Constructor syntax

new Runbook(name: string, args: RunbookArgs, opts?: CustomResourceOptions);
@overload
def Runbook(resource_name: str,
            args: RunbookArgs,
            opts: Optional[ResourceOptions] = None)

@overload
def Runbook(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            project_id: Optional[str] = None,
            connectivity_policies: Optional[Sequence[RunbookConnectivityPolicyArgs]] = None,
            default_guided_failure_mode: Optional[str] = None,
            description: Optional[str] = None,
            environment_scope: Optional[str] = None,
            environments: Optional[Sequence[str]] = None,
            force_package_download: Optional[bool] = None,
            multi_tenancy_mode: Optional[str] = None,
            name: Optional[str] = None,
            retention_policies: Optional[Sequence[RunbookRetentionPolicyArgs]] = None,
            space_id: Optional[str] = None)
func NewRunbook(ctx *Context, name string, args RunbookArgs, opts ...ResourceOption) (*Runbook, error)
public Runbook(string name, RunbookArgs args, CustomResourceOptions? opts = null)
public Runbook(String name, RunbookArgs args)
public Runbook(String name, RunbookArgs args, CustomResourceOptions options)
type: octopusdeploy:Runbook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RunbookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RunbookArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RunbookArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RunbookArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RunbookArgs
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 runbookResource = new Octopusdeploy.Runbook("runbookResource", new()
{
    ProjectId = "string",
    ConnectivityPolicies = new[]
    {
        new Octopusdeploy.Inputs.RunbookConnectivityPolicyArgs
        {
            AllowDeploymentsToNoTargets = false,
            ExcludeUnhealthyTargets = false,
            SkipMachineBehavior = "string",
            TargetRoles = new[]
            {
                "string",
            },
        },
    },
    DefaultGuidedFailureMode = "string",
    Description = "string",
    EnvironmentScope = "string",
    Environments = new[]
    {
        "string",
    },
    ForcePackageDownload = false,
    MultiTenancyMode = "string",
    Name = "string",
    RetentionPolicies = new[]
    {
        new Octopusdeploy.Inputs.RunbookRetentionPolicyArgs
        {
            QuantityToKeep = 0,
            ShouldKeepForever = false,
        },
    },
    SpaceId = "string",
});
Copy
example, err := octopusdeploy.NewRunbook(ctx, "runbookResource", &octopusdeploy.RunbookArgs{
ProjectId: pulumi.String("string"),
ConnectivityPolicies: .RunbookConnectivityPolicyArray{
&.RunbookConnectivityPolicyArgs{
AllowDeploymentsToNoTargets: pulumi.Bool(false),
ExcludeUnhealthyTargets: pulumi.Bool(false),
SkipMachineBehavior: pulumi.String("string"),
TargetRoles: pulumi.StringArray{
pulumi.String("string"),
},
},
},
DefaultGuidedFailureMode: pulumi.String("string"),
Description: pulumi.String("string"),
EnvironmentScope: pulumi.String("string"),
Environments: pulumi.StringArray{
pulumi.String("string"),
},
ForcePackageDownload: pulumi.Bool(false),
MultiTenancyMode: pulumi.String("string"),
Name: pulumi.String("string"),
RetentionPolicies: .RunbookRetentionPolicyArray{
&.RunbookRetentionPolicyArgs{
QuantityToKeep: pulumi.Float64(0),
ShouldKeepForever: pulumi.Bool(false),
},
},
SpaceId: pulumi.String("string"),
})
Copy
var runbookResource = new Runbook("runbookResource", RunbookArgs.builder()
    .projectId("string")
    .connectivityPolicies(RunbookConnectivityPolicyArgs.builder()
        .allowDeploymentsToNoTargets(false)
        .excludeUnhealthyTargets(false)
        .skipMachineBehavior("string")
        .targetRoles("string")
        .build())
    .defaultGuidedFailureMode("string")
    .description("string")
    .environmentScope("string")
    .environments("string")
    .forcePackageDownload(false)
    .multiTenancyMode("string")
    .name("string")
    .retentionPolicies(RunbookRetentionPolicyArgs.builder()
        .quantityToKeep(0)
        .shouldKeepForever(false)
        .build())
    .spaceId("string")
    .build());
Copy
runbook_resource = octopusdeploy.Runbook("runbookResource",
    project_id="string",
    connectivity_policies=[{
        "allow_deployments_to_no_targets": False,
        "exclude_unhealthy_targets": False,
        "skip_machine_behavior": "string",
        "target_roles": ["string"],
    }],
    default_guided_failure_mode="string",
    description="string",
    environment_scope="string",
    environments=["string"],
    force_package_download=False,
    multi_tenancy_mode="string",
    name="string",
    retention_policies=[{
        "quantity_to_keep": 0,
        "should_keep_forever": False,
    }],
    space_id="string")
Copy
const runbookResource = new octopusdeploy.Runbook("runbookResource", {
    projectId: "string",
    connectivityPolicies: [{
        allowDeploymentsToNoTargets: false,
        excludeUnhealthyTargets: false,
        skipMachineBehavior: "string",
        targetRoles: ["string"],
    }],
    defaultGuidedFailureMode: "string",
    description: "string",
    environmentScope: "string",
    environments: ["string"],
    forcePackageDownload: false,
    multiTenancyMode: "string",
    name: "string",
    retentionPolicies: [{
        quantityToKeep: 0,
        shouldKeepForever: false,
    }],
    spaceId: "string",
});
Copy
type: octopusdeploy:Runbook
properties:
    connectivityPolicies:
        - allowDeploymentsToNoTargets: false
          excludeUnhealthyTargets: false
          skipMachineBehavior: string
          targetRoles:
            - string
    defaultGuidedFailureMode: string
    description: string
    environmentScope: string
    environments:
        - string
    forcePackageDownload: false
    multiTenancyMode: string
    name: string
    projectId: string
    retentionPolicies:
        - quantityToKeep: 0
          shouldKeepForever: false
    spaceId: string
Copy

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

ProjectId This property is required. string
The project that this runbook belongs to.
ConnectivityPolicies List<RunbookConnectivityPolicy>
DefaultGuidedFailureMode string
Sets the runbook guided failure mode.
Description string
The description of this runbook.
EnvironmentScope string
Determines how the runbook is scoped to environments.
Environments List<string>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
ForcePackageDownload bool
Whether to force packages to be re-downloaded or not.
MultiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
Name string
The name of the runbook in Octopus Deploy. This name must be unique.
RetentionPolicies List<RunbookRetentionPolicy>
Sets the runbook retention policy.
SpaceId string
The space ID associated with this runbook.
ProjectId This property is required. string
The project that this runbook belongs to.
ConnectivityPolicies []RunbookConnectivityPolicyArgs
DefaultGuidedFailureMode string
Sets the runbook guided failure mode.
Description string
The description of this runbook.
EnvironmentScope string
Determines how the runbook is scoped to environments.
Environments []string
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
ForcePackageDownload bool
Whether to force packages to be re-downloaded or not.
MultiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
Name string
The name of the runbook in Octopus Deploy. This name must be unique.
RetentionPolicies []RunbookRetentionPolicyArgs
Sets the runbook retention policy.
SpaceId string
The space ID associated with this runbook.
projectId This property is required. String
The project that this runbook belongs to.
connectivityPolicies List<RunbookConnectivityPolicy>
defaultGuidedFailureMode String
Sets the runbook guided failure mode.
description String
The description of this runbook.
environmentScope String
Determines how the runbook is scoped to environments.
environments List<String>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload Boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode String
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name String
The name of the runbook in Octopus Deploy. This name must be unique.
retentionPolicies List<RunbookRetentionPolicy>
Sets the runbook retention policy.
spaceId String
The space ID associated with this runbook.
projectId This property is required. string
The project that this runbook belongs to.
connectivityPolicies RunbookConnectivityPolicy[]
defaultGuidedFailureMode string
Sets the runbook guided failure mode.
description string
The description of this runbook.
environmentScope string
Determines how the runbook is scoped to environments.
environments string[]
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name string
The name of the runbook in Octopus Deploy. This name must be unique.
retentionPolicies RunbookRetentionPolicy[]
Sets the runbook retention policy.
spaceId string
The space ID associated with this runbook.
project_id This property is required. str
The project that this runbook belongs to.
connectivity_policies Sequence[RunbookConnectivityPolicyArgs]
default_guided_failure_mode str
Sets the runbook guided failure mode.
description str
The description of this runbook.
environment_scope str
Determines how the runbook is scoped to environments.
environments Sequence[str]
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
force_package_download bool
Whether to force packages to be re-downloaded or not.
multi_tenancy_mode str
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name str
The name of the runbook in Octopus Deploy. This name must be unique.
retention_policies Sequence[RunbookRetentionPolicyArgs]
Sets the runbook retention policy.
space_id str
The space ID associated with this runbook.
projectId This property is required. String
The project that this runbook belongs to.
connectivityPolicies List<Property Map>
defaultGuidedFailureMode String
Sets the runbook guided failure mode.
description String
The description of this runbook.
environmentScope String
Determines how the runbook is scoped to environments.
environments List<String>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload Boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode String
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name String
The name of the runbook in Octopus Deploy. This name must be unique.
retentionPolicies List<Property Map>
Sets the runbook retention policy.
spaceId String
The space ID associated with this runbook.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PublishedRunbookSnapshotId string
The published snapshot ID.
RunbookProcessId string
The runbook process ID.
Id string
The provider-assigned unique ID for this managed resource.
PublishedRunbookSnapshotId string
The published snapshot ID.
RunbookProcessId string
The runbook process ID.
id String
The provider-assigned unique ID for this managed resource.
publishedRunbookSnapshotId String
The published snapshot ID.
runbookProcessId String
The runbook process ID.
id string
The provider-assigned unique ID for this managed resource.
publishedRunbookSnapshotId string
The published snapshot ID.
runbookProcessId string
The runbook process ID.
id str
The provider-assigned unique ID for this managed resource.
published_runbook_snapshot_id str
The published snapshot ID.
runbook_process_id str
The runbook process ID.
id String
The provider-assigned unique ID for this managed resource.
publishedRunbookSnapshotId String
The published snapshot ID.
runbookProcessId String
The runbook process ID.

Look up Existing Runbook Resource

Get an existing Runbook 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?: RunbookState, opts?: CustomResourceOptions): Runbook
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connectivity_policies: Optional[Sequence[RunbookConnectivityPolicyArgs]] = None,
        default_guided_failure_mode: Optional[str] = None,
        description: Optional[str] = None,
        environment_scope: Optional[str] = None,
        environments: Optional[Sequence[str]] = None,
        force_package_download: Optional[bool] = None,
        multi_tenancy_mode: Optional[str] = None,
        name: Optional[str] = None,
        project_id: Optional[str] = None,
        published_runbook_snapshot_id: Optional[str] = None,
        retention_policies: Optional[Sequence[RunbookRetentionPolicyArgs]] = None,
        runbook_process_id: Optional[str] = None,
        space_id: Optional[str] = None) -> Runbook
func GetRunbook(ctx *Context, name string, id IDInput, state *RunbookState, opts ...ResourceOption) (*Runbook, error)
public static Runbook Get(string name, Input<string> id, RunbookState? state, CustomResourceOptions? opts = null)
public static Runbook get(String name, Output<String> id, RunbookState state, CustomResourceOptions options)
resources:  _:    type: octopusdeploy:Runbook    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ConnectivityPolicies List<RunbookConnectivityPolicy>
DefaultGuidedFailureMode string
Sets the runbook guided failure mode.
Description string
The description of this runbook.
EnvironmentScope string
Determines how the runbook is scoped to environments.
Environments List<string>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
ForcePackageDownload bool
Whether to force packages to be re-downloaded or not.
MultiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
Name string
The name of the runbook in Octopus Deploy. This name must be unique.
ProjectId string
The project that this runbook belongs to.
PublishedRunbookSnapshotId string
The published snapshot ID.
RetentionPolicies List<RunbookRetentionPolicy>
Sets the runbook retention policy.
RunbookProcessId string
The runbook process ID.
SpaceId string
The space ID associated with this runbook.
ConnectivityPolicies []RunbookConnectivityPolicyArgs
DefaultGuidedFailureMode string
Sets the runbook guided failure mode.
Description string
The description of this runbook.
EnvironmentScope string
Determines how the runbook is scoped to environments.
Environments []string
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
ForcePackageDownload bool
Whether to force packages to be re-downloaded or not.
MultiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
Name string
The name of the runbook in Octopus Deploy. This name must be unique.
ProjectId string
The project that this runbook belongs to.
PublishedRunbookSnapshotId string
The published snapshot ID.
RetentionPolicies []RunbookRetentionPolicyArgs
Sets the runbook retention policy.
RunbookProcessId string
The runbook process ID.
SpaceId string
The space ID associated with this runbook.
connectivityPolicies List<RunbookConnectivityPolicy>
defaultGuidedFailureMode String
Sets the runbook guided failure mode.
description String
The description of this runbook.
environmentScope String
Determines how the runbook is scoped to environments.
environments List<String>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload Boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode String
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name String
The name of the runbook in Octopus Deploy. This name must be unique.
projectId String
The project that this runbook belongs to.
publishedRunbookSnapshotId String
The published snapshot ID.
retentionPolicies List<RunbookRetentionPolicy>
Sets the runbook retention policy.
runbookProcessId String
The runbook process ID.
spaceId String
The space ID associated with this runbook.
connectivityPolicies RunbookConnectivityPolicy[]
defaultGuidedFailureMode string
Sets the runbook guided failure mode.
description string
The description of this runbook.
environmentScope string
Determines how the runbook is scoped to environments.
environments string[]
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode string
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name string
The name of the runbook in Octopus Deploy. This name must be unique.
projectId string
The project that this runbook belongs to.
publishedRunbookSnapshotId string
The published snapshot ID.
retentionPolicies RunbookRetentionPolicy[]
Sets the runbook retention policy.
runbookProcessId string
The runbook process ID.
spaceId string
The space ID associated with this runbook.
connectivity_policies Sequence[RunbookConnectivityPolicyArgs]
default_guided_failure_mode str
Sets the runbook guided failure mode.
description str
The description of this runbook.
environment_scope str
Determines how the runbook is scoped to environments.
environments Sequence[str]
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
force_package_download bool
Whether to force packages to be re-downloaded or not.
multi_tenancy_mode str
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name str
The name of the runbook in Octopus Deploy. This name must be unique.
project_id str
The project that this runbook belongs to.
published_runbook_snapshot_id str
The published snapshot ID.
retention_policies Sequence[RunbookRetentionPolicyArgs]
Sets the runbook retention policy.
runbook_process_id str
The runbook process ID.
space_id str
The space ID associated with this runbook.
connectivityPolicies List<Property Map>
defaultGuidedFailureMode String
Sets the runbook guided failure mode.
description String
The description of this runbook.
environmentScope String
Determines how the runbook is scoped to environments.
environments List<String>
When environment_scope is set to "Specified", this is the list of environments the runbook can be run against.
forcePackageDownload Boolean
Whether to force packages to be re-downloaded or not.
multiTenancyMode String
The tenanted deployment mode of the runbook. Valid modes are Untenanted, TenantedOrUntenanted, Tenanted
name String
The name of the runbook in Octopus Deploy. This name must be unique.
projectId String
The project that this runbook belongs to.
publishedRunbookSnapshotId String
The published snapshot ID.
retentionPolicies List<Property Map>
Sets the runbook retention policy.
runbookProcessId String
The runbook process ID.
spaceId String
The space ID associated with this runbook.

Supporting Types

RunbookConnectivityPolicy
, RunbookConnectivityPolicyArgs

RunbookRetentionPolicy
, RunbookRetentionPolicyArgs

QuantityToKeep double
How many runs to keep per environment.
ShouldKeepForever bool
Indicates if items should never be deleted. The default value is false.
QuantityToKeep float64
How many runs to keep per environment.
ShouldKeepForever bool
Indicates if items should never be deleted. The default value is false.
quantityToKeep Double
How many runs to keep per environment.
shouldKeepForever Boolean
Indicates if items should never be deleted. The default value is false.
quantityToKeep number
How many runs to keep per environment.
shouldKeepForever boolean
Indicates if items should never be deleted. The default value is false.
quantity_to_keep float
How many runs to keep per environment.
should_keep_forever bool
Indicates if items should never be deleted. The default value is false.
quantityToKeep Number
How many runs to keep per environment.
shouldKeepForever Boolean
Indicates if items should never be deleted. The default value is false.

Package Details

Repository
octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
License
Notes
This Pulumi package is based on the octopusdeploy Terraform Provider.