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 string
- The unique name of the resource.
- args RunbookArgs
- 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 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 string
- The unique name of the resource.
- args RunbookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RunbookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := octopusdeploy.NewRunbook(ctx, "runbookResource", &octopusdeploy.RunbookArgs{
ProjectId: pulumi.String("string"),
ConnectivityPolicies: octopusdeploy.RunbookConnectivityPolicyArray{
&octopusdeploy.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: octopusdeploy.RunbookRetentionPolicyArray{
&octopusdeploy.RunbookRetentionPolicyArgs{
QuantityToKeep: pulumi.Float64(0),
ShouldKeepForever: pulumi.Bool(false),
},
},
SpaceId: pulumi.String("string"),
})
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());
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")
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",
});
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
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:
- Project
Id string - The project that this runbook belongs to.
- Connectivity
Policies List<RunbookConnectivity Policy> - Default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- Description string
- The description of this runbook.
- Environment
Scope 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.
- Force
Package boolDownload - Whether to force packages to be re-downloaded or not.
- Multi
Tenancy stringMode - 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.
- Retention
Policies List<RunbookRetention Policy> - Sets the runbook retention policy.
- Space
Id string - The space ID associated with this runbook.
- Project
Id string - The project that this runbook belongs to.
- Connectivity
Policies []RunbookConnectivity Policy Args - Default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- Description string
- The description of this runbook.
- Environment
Scope 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.
- Force
Package boolDownload - Whether to force packages to be re-downloaded or not.
- Multi
Tenancy stringMode - 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.
- Retention
Policies []RunbookRetention Policy Args - Sets the runbook retention policy.
- Space
Id string - The space ID associated with this runbook.
- project
Id String - The project that this runbook belongs to.
- connectivity
Policies List<RunbookConnectivity Policy> - default
Guided StringFailure Mode - Sets the runbook guided failure mode.
- description String
- The description of this runbook.
- environment
Scope 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.
- force
Package BooleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy StringMode - 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.
- retention
Policies List<RunbookRetention Policy> - Sets the runbook retention policy.
- space
Id String - The space ID associated with this runbook.
- project
Id string - The project that this runbook belongs to.
- connectivity
Policies RunbookConnectivity Policy[] - default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- description string
- The description of this runbook.
- environment
Scope 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.
- force
Package booleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy stringMode - 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.
- retention
Policies RunbookRetention Policy[] - Sets the runbook retention policy.
- space
Id string - The space ID associated with this runbook.
- project_
id str - The project that this runbook belongs to.
- connectivity_
policies Sequence[RunbookConnectivity Policy Args] - default_
guided_ strfailure_ mode - 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_ booldownload - Whether to force packages to be re-downloaded or not.
- multi_
tenancy_ strmode - 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[RunbookRetention Policy Args] - Sets the runbook retention policy.
- space_
id str - The space ID associated with this runbook.
- project
Id String - The project that this runbook belongs to.
- connectivity
Policies List<Property Map> - default
Guided StringFailure Mode - Sets the runbook guided failure mode.
- description String
- The description of this runbook.
- environment
Scope 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.
- force
Package BooleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy StringMode - 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.
- retention
Policies List<Property Map> - Sets the runbook retention policy.
- space
Id 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.
- Published
Runbook stringSnapshot Id - The published snapshot ID.
- Runbook
Process stringId - The runbook process ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Published
Runbook stringSnapshot Id - The published snapshot ID.
- Runbook
Process stringId - The runbook process ID.
- id String
- The provider-assigned unique ID for this managed resource.
- published
Runbook StringSnapshot Id - The published snapshot ID.
- runbook
Process StringId - The runbook process ID.
- id string
- The provider-assigned unique ID for this managed resource.
- published
Runbook stringSnapshot Id - The published snapshot ID.
- runbook
Process stringId - The runbook process ID.
- id str
- The provider-assigned unique ID for this managed resource.
- published_
runbook_ strsnapshot_ id - The published snapshot ID.
- runbook_
process_ strid - The runbook process ID.
- id String
- The provider-assigned unique ID for this managed resource.
- published
Runbook StringSnapshot Id - The published snapshot ID.
- runbook
Process StringId - 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
- 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.
- Connectivity
Policies List<RunbookConnectivity Policy> - Default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- Description string
- The description of this runbook.
- Environment
Scope 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.
- Force
Package boolDownload - Whether to force packages to be re-downloaded or not.
- Multi
Tenancy stringMode - 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.
- Project
Id string - The project that this runbook belongs to.
- Published
Runbook stringSnapshot Id - The published snapshot ID.
- Retention
Policies List<RunbookRetention Policy> - Sets the runbook retention policy.
- Runbook
Process stringId - The runbook process ID.
- Space
Id string - The space ID associated with this runbook.
- Connectivity
Policies []RunbookConnectivity Policy Args - Default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- Description string
- The description of this runbook.
- Environment
Scope 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.
- Force
Package boolDownload - Whether to force packages to be re-downloaded or not.
- Multi
Tenancy stringMode - 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.
- Project
Id string - The project that this runbook belongs to.
- Published
Runbook stringSnapshot Id - The published snapshot ID.
- Retention
Policies []RunbookRetention Policy Args - Sets the runbook retention policy.
- Runbook
Process stringId - The runbook process ID.
- Space
Id string - The space ID associated with this runbook.
- connectivity
Policies List<RunbookConnectivity Policy> - default
Guided StringFailure Mode - Sets the runbook guided failure mode.
- description String
- The description of this runbook.
- environment
Scope 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.
- force
Package BooleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy StringMode - 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.
- project
Id String - The project that this runbook belongs to.
- published
Runbook StringSnapshot Id - The published snapshot ID.
- retention
Policies List<RunbookRetention Policy> - Sets the runbook retention policy.
- runbook
Process StringId - The runbook process ID.
- space
Id String - The space ID associated with this runbook.
- connectivity
Policies RunbookConnectivity Policy[] - default
Guided stringFailure Mode - Sets the runbook guided failure mode.
- description string
- The description of this runbook.
- environment
Scope 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.
- force
Package booleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy stringMode - 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.
- project
Id string - The project that this runbook belongs to.
- published
Runbook stringSnapshot Id - The published snapshot ID.
- retention
Policies RunbookRetention Policy[] - Sets the runbook retention policy.
- runbook
Process stringId - The runbook process ID.
- space
Id string - The space ID associated with this runbook.
- connectivity_
policies Sequence[RunbookConnectivity Policy Args] - default_
guided_ strfailure_ mode - 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_ booldownload - Whether to force packages to be re-downloaded or not.
- multi_
tenancy_ strmode - 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_ strsnapshot_ id - The published snapshot ID.
- retention_
policies Sequence[RunbookRetention Policy Args] - Sets the runbook retention policy.
- runbook_
process_ strid - The runbook process ID.
- space_
id str - The space ID associated with this runbook.
- connectivity
Policies List<Property Map> - default
Guided StringFailure Mode - Sets the runbook guided failure mode.
- description String
- The description of this runbook.
- environment
Scope 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.
- force
Package BooleanDownload - Whether to force packages to be re-downloaded or not.
- multi
Tenancy StringMode - 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.
- project
Id String - The project that this runbook belongs to.
- published
Runbook StringSnapshot Id - The published snapshot ID.
- retention
Policies List<Property Map> - Sets the runbook retention policy.
- runbook
Process StringId - The runbook process ID.
- space
Id String - The space ID associated with this runbook.
Supporting Types
RunbookConnectivityPolicy, RunbookConnectivityPolicyArgs
- Allow
Deployments boolTo No Targets - Exclude
Unhealthy boolTargets - Skip
Machine stringBehavior - Target
Roles List<string>
- Allow
Deployments boolTo No Targets - Exclude
Unhealthy boolTargets - Skip
Machine stringBehavior - Target
Roles []string
- allow
Deployments BooleanTo No Targets - exclude
Unhealthy BooleanTargets - skip
Machine StringBehavior - target
Roles List<String>
- allow
Deployments booleanTo No Targets - exclude
Unhealthy booleanTargets - skip
Machine stringBehavior - target
Roles string[]
- allow_
deployments_ boolto_ no_ targets - exclude_
unhealthy_ booltargets - skip_
machine_ strbehavior - target_
roles Sequence[str]
- allow
Deployments BooleanTo No Targets - exclude
Unhealthy BooleanTargets - skip
Machine StringBehavior - target
Roles List<String>
RunbookRetentionPolicy, RunbookRetentionPolicyArgs
- Quantity
To doubleKeep - How many runs to keep per environment.
- Should
Keep boolForever - Indicates if items should never be deleted. The default value is
false
.
- Quantity
To float64Keep - How many runs to keep per environment.
- Should
Keep boolForever - Indicates if items should never be deleted. The default value is
false
.
- quantity
To DoubleKeep - How many runs to keep per environment.
- should
Keep BooleanForever - Indicates if items should never be deleted. The default value is
false
.
- quantity
To numberKeep - How many runs to keep per environment.
- should
Keep booleanForever - Indicates if items should never be deleted. The default value is
false
.
- quantity_
to_ floatkeep - How many runs to keep per environment.
- should_
keep_ boolforever - Indicates if items should never be deleted. The default value is
false
.
- quantity
To NumberKeep - How many runs to keep per environment.
- should
Keep BooleanForever - 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.