Skip to content

Commit b787583

Browse files
committed
feat: Deprecate deployment_process and runbook_process resources in favor of new process resource
1 parent e4f54cd commit b787583

File tree

8 files changed

+40
-147
lines changed

8 files changed

+40
-147
lines changed

docs/guides/breaking-changes-list.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This page details the breaking changes and deprecations we're managing according
1010

1111
| Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
1212
|---------|---------------------------------------------------------|-------------|-----------------|-----------|------------|
13-
| [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
13+
| [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
14+
| v1.0.0 | `octopusdeploy_deployment_process` | `octopusdeploy_process` | [Guide](./migration-guide-v1.0.0.md) | 2025-11-05 | 2026-05-05 |
15+
| v1.0.0 | `octopusdeploy_runbook_process` | `octopusdeploy_process` | [Guide](./migration-guide-v1.0.0.md) | 2025-11-05 | 2026-05-05 |
1416

1517
## Enacted
1618

docs/resources/deployment_process.md

Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# generated by https://github.com/hashicorp/terraform-plugin-docs
32
page_title: "octopusdeploy_deployment_process Resource - terraform-provider-octopusdeploy"
43
subcategory: ""
54
description: |-
@@ -10,129 +9,7 @@ description: |-
109

1110
This resource manages deployment processes in Octopus Deploy.
1211

13-
## Example Usage
14-
15-
```terraform
16-
# basic deployment process with 2 run a script steps
17-
resource "octopusdeploy_deployment_process" "example" {
18-
project_id = "Projects-123"
19-
step {
20-
condition = "Success"
21-
name = "Hello world (using PowerShell)"
22-
package_requirement = "LetOctopusDecide"
23-
start_trigger = "StartAfterPrevious"
24-
run_script_action {
25-
can_be_used_for_project_versioning = false
26-
condition = "Success"
27-
is_disabled = false
28-
is_required = true
29-
name = "Hello world (using PowerShell)"
30-
script_body = <<-EOT
31-
Write-Host 'Hello world, using PowerShell'
32-
#TODO: Experiment with steps of your own :)
33-
Write-Host '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
34-
EOT
35-
run_on_server = true
36-
}
37-
}
38-
step {
39-
condition = "Success"
40-
name = "Hello world (using Bash)"
41-
package_requirement = "LetOctopusDecide"
42-
start_trigger = "StartWithPrevious"
43-
run_script_action {
44-
can_be_used_for_project_versioning = false
45-
condition = "Success"
46-
is_disabled = false
47-
is_required = true
48-
name = "Hello world (using Bash)"
49-
script_body = <<-EOT
50-
echo 'Hello world, using Bash'
51-
#TODO: Experiment with steps of your own :)
52-
echo '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
53-
EOT
54-
run_on_server = true
55-
}
56-
}
57-
}
58-
59-
# basic deployment process with 2 run a script steps as child steps
60-
resource "octopusdeploy_deployment_process" "child_step_example" {
61-
project_id = "Projects-123"
62-
step {
63-
condition = "Success"
64-
name = "Hello world (using PowerShell)"
65-
package_requirement = "LetOctopusDecide"
66-
start_trigger = "StartAfterPrevious"
67-
target_roles = [ "hello-world" ]
68-
run_script_action {
69-
name = "Hello world (using PowerShell)"
70-
sort_order = 1
71-
can_be_used_for_project_versioning = false
72-
condition = "Success"
73-
is_disabled = false
74-
is_required = true
75-
script_body = <<-EOT
76-
Write-Host 'Hello world, using PowerShell'
77-
#TODO: Experiment with steps of your own :)
78-
Write-Host '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
79-
EOT
80-
}
81-
run_script_action {
82-
name = "Hello world (using Bash)"
83-
sort_order = 2
84-
can_be_used_for_project_versioning = false
85-
condition = "Success"
86-
is_disabled = false
87-
is_required = true
88-
script_body = <<-EOT
89-
echo 'Hello world, using Bash'
90-
#TODO: Experiment with steps of your own :)
91-
echo '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
92-
EOT
93-
}
94-
}
95-
}
96-
97-
# rolling deployment process with a step with 2 run a script steps as child steps deploying to 2 targets in parallel
98-
resource "octopusdeploy_deployment_process" "child_step_rolling_deployment_example" {
99-
project_id = "Projects-123"
100-
step {
101-
condition = "Success"
102-
name = "Hello world (using PowerShell)"
103-
package_requirement = "LetOctopusDecide"
104-
start_trigger = "StartAfterPrevious"
105-
target_roles = [ "hello-world" ]
106-
window_size = 2
107-
run_script_action {
108-
name = "Hello world (using PowerShell)"
109-
sort_order = 1
110-
can_be_used_for_project_versioning = false
111-
condition = "Success"
112-
is_disabled = false
113-
is_required = true
114-
script_body = <<-EOT
115-
Write-Host 'Hello world, using PowerShell'
116-
#TODO: Experiment with steps of your own :)
117-
Write-Host '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
118-
EOT
119-
}
120-
run_script_action {
121-
name = "Hello world (using Bash)"
122-
sort_order = 2
123-
can_be_used_for_project_versioning = false
124-
condition = "Success"
125-
is_disabled = false
126-
is_required = true
127-
script_body = <<-EOT
128-
echo 'Hello world, using Bash'
129-
#TODO: Experiment with steps of your own :)
130-
echo '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
131-
EOT
132-
}
133-
}
134-
}
135-
```
12+
~> **WARNING This resource is deprecated and will be removed in a future version. Please use the `octopusdeploy_process` resource instead.
13613

13714
<!-- schema generated by tfplugindocs -->
13815
## Schema
@@ -1100,11 +977,3 @@ Optional:
1100977
- `id` (String) The unique ID for this resource.
1101978
- `name` (String) The name of this resource.
1102979
- `properties` (Map of String) A list of properties associated with this package.
1103-
1104-
## Import
1105-
1106-
Import is supported using the following syntax:
1107-
1108-
```shell
1109-
terraform import [options] octopusdeploy_deployment_process.<name> <deployment-process-id>
1110-
```

docs/resources/runbook_process.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
This resource manages runbook processes in Octopus Deploy.
1111

12+
~> **WARNING This resource is deprecated and will be removed in a future version. Please use the `octopusdeploy_process` resource instead.
13+
1214
~> **NOTE Runbooks and Runbooks Processes which are stored in CaC cannot be managed via Terraform. If a project is converted to a CaC project, the Runbooks and Runbook Processes will cause warnings in your plan, and will not be updated when applying changes.
1315

1416
<!-- schema generated by tfplugindocs -->

octopusdeploy/resource_deployment_process.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ import (
1616

1717
func resourceDeploymentProcess() *schema.Resource {
1818
return &schema.Resource{
19-
CreateContext: resourceDeploymentProcessCreate,
20-
DeleteContext: resourceDeploymentProcessDelete,
21-
Description: "This resource manages deployment processes in Octopus Deploy.",
22-
Importer: getImporter(),
23-
ReadContext: resourceDeploymentProcessRead,
24-
Schema: getDeploymentProcessSchema(),
25-
UpdateContext: resourceDeploymentProcessUpdate,
19+
DeprecationMessage: "The 'octopusdeploy_deployment_process' resource is deprecated and will be removed in a future version. Please use the octopusdeploy_process resource instead.",
20+
CreateContext: resourceDeploymentProcessCreate,
21+
DeleteContext: resourceDeploymentProcessDelete,
22+
Description: "This resource manages deployment processes in Octopus Deploy.",
23+
Importer: getImporter(),
24+
ReadContext: resourceDeploymentProcessRead,
25+
Schema: getDeploymentProcessSchema(),
26+
UpdateContext: resourceDeploymentProcessUpdate,
2627
}
2728
}
2829

octopusdeploy/resource_runbook_process.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ import (
1616

1717
func resourceRunbookProcess() *schema.Resource {
1818
return &schema.Resource{
19-
CreateContext: resourceRunbookProcessCreate,
20-
DeleteContext: resourceRunbookProcessDelete,
21-
Description: "This resource manages runbook processes in Octopus Deploy.",
22-
ReadContext: resourceRunbookProcessRead,
23-
Schema: getRunbookProcessSchema(),
24-
UpdateContext: resourceRunbookProcessUpdate,
19+
DeprecationMessage: "The 'octopusdeploy_runbook_process' resource is deprecated and will be removed in a future version. Please use the octopusdeploy_process resource instead.",
20+
CreateContext: resourceRunbookProcessCreate,
21+
DeleteContext: resourceRunbookProcessDelete,
22+
Description: "This resource manages runbook processes in Octopus Deploy.",
23+
ReadContext: resourceRunbookProcessRead,
24+
Schema: getRunbookProcessSchema(),
25+
UpdateContext: resourceRunbookProcessUpdate,
2526
}
2627
}
2728

templates/guides/breaking-changes-list.md.tmpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This page details the breaking changes and deprecations we're managing according
1010

1111
| Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
1212
|---------|---------------------------------------------------------|-------------|-----------------|-----------|------------|
13-
| [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
13+
| [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
14+
| v1.0.0 | `octopusdeploy_deployment_process` | `octopusdeploy_process` | [Guide](./migration-guide-v1.0.0.md) | 2025-11-05 | 2026-05-05 |
15+
| v1.0.0 | `octopusdeploy_runbook_process` | `octopusdeploy_process` | [Guide](./migration-guide-v1.0.0.md) | 2025-11-05 | 2026-05-05 |
1416

1517
## Enacted
1618

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3+
subcategory: ""
4+
description: |-
5+
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6+
---
7+
8+
# {{.Name}} ({{.Type}})
9+
10+
{{ .Description | trimspace }}
11+
12+
~> **WARNING This resource is deprecated and will be removed in a future version. Please use the `octopusdeploy_process` resource instead.
13+
14+
{{ .SchemaMarkdown | trimspace }}

templates/resources/runbook_process.md.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
{{ .Description | trimspace }}
1111

12+
~> **WARNING This resource is deprecated and will be removed in a future version. Please use the `octopusdeploy_process` resource instead.
13+
1214
~> **NOTE Runbooks and Runbooks Processes which are stored in CaC cannot be managed via Terraform. If a project is converted to a CaC project, the Runbooks and Runbook Processes will cause warnings in your plan, and will not be updated when applying changes.
1315

1416
{{ .SchemaMarkdown | trimspace }}

0 commit comments

Comments
 (0)