You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/design-decisions.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,34 @@ This document is to explain our stance on certain implementation decisions for t
9
9
10
10
## Version-Controlled Projects and Terraform
11
11
12
-
When managing Deployment Processes and Runbooks you can do two things
12
+
When managing Deployment Processes and Runbooks, you can choose one of two options. Either:
13
13
14
14
1. Define a Database-backed Project and its Process(es) in Terraform
15
+
16
+
*or*
17
+
15
18
2. Define a Version-Controlled Project and its settings in Terraform, but define the Process as OCL in Git
16
19
17
20
~> We won’t allow you to try to manage the Process of a Version-Controlled Project in Terraform, and will give an informative error message if you try.
18
21
19
22
### Why
20
-
There should be one source-of-truth for your as-code interactions with Octopus.
23
+
We believe if you're going to version control your config, then you should have one clear source-of-truth for each resource you're defining. Allowing you to define the process of a Version-Controlled Project through Terraform breaks that principle: which is the source of truth, the Terraform or the Project's OCL?
24
+
25
+
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc), so attempting to allow you to define a Process in Terraform, and expect to have that write Git commits to the underlying OCL of a Version-Controlled project is a recipe for a bad time.
26
+
27
+
We want to let both Terraform, and Version Controlled Projects do what they do best, and not blur the lines between the two.
28
+
29
+
## Processes: Property Bags vs Strongly Typed Steps
30
+
31
+
For v1.0, we've moved away from strongly-typed steps, and leaned in to the key-value-pair Property bag.
32
+
33
+
### Why
34
+
In versions of the provider before v1.0, we experimented with both leaning on the Properties bag when defining a Step, and with providing strongly-typed Resources specific to each step. The result was a compromise between the two approaches: some properties were set via strongly typed attributes, and some needed to be set in the properties bag.
35
+
36
+
It was hard to know which should be set where, and you could easily run into conflicts and state-drift when using a strongly-typed attribute when available (such as the `run_on_server` attribute), where Octopus Server would respond with elements in the property bag.
37
+
38
+
From a maintenance perspective, we currently don't have an easy way to generate these strongly-typed step representations, so each needs to be manually crafted and kept in sync with Octopus Server. This creates a maintenance burden that resulted in a bad experience for our Terraform Provider users.
21
39
22
-
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc).
40
+
For the immediate future, the new Process resource will not have strongly-typed steps, and you'll need to use the properties bag instead. We've provided guidance on how to easily find the right properties for your step.
23
41
24
-
We want to let Version Control do what it does best, and not blur the lines between the two.
42
+
In the medium-longer term, we would like to rearchitect the way our steps are defined in Octopus, which would enable us to lean on code generation to provide strongly typed step resources that are easily kept in sync with Octopus Server. The architectural improvements we've made in the Provider with the new Process resource set us up to be able to adopt strongly-typed steps without the previous state-drift issues, once we're able to do it in a maintainable way.
Copy file name to clipboardExpand all lines: templates/guides/design-decisions.md.tmpl
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,34 @@ This document is to explain our stance on certain implementation decisions for t
9
9
10
10
## Version-Controlled Projects and Terraform
11
11
12
-
When managing Deployment Processes and Runbooks you can do two things
12
+
When managing Deployment Processes and Runbooks, you can choose one of two options. Either:
13
13
14
14
1. Define a Database-backed Project and its Process(es) in Terraform
15
+
16
+
*or*
17
+
15
18
2. Define a Version-Controlled Project and its settings in Terraform, but define the Process as OCL in Git
16
19
17
20
~> We won’t allow you to try to manage the Process of a Version-Controlled Project in Terraform, and will give an informative error message if you try.
18
21
19
22
### Why
20
-
There should be one source-of-truth for your as-code interactions with Octopus.
23
+
We believe if you're going to version control your config, then you should have one clear source-of-truth for each resource you're defining. Allowing you to define the process of a Version-Controlled Project through Terraform breaks that principle: which is the source of truth, the Terraform or the Project's OCL?
24
+
25
+
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc), so attempting to allow you to define a Process in Terraform, and expect to have that write Git commits to the underlying OCL of a Version-Controlled project is a recipe for a bad time.
26
+
27
+
We want to let both Terraform, and Version Controlled Projects do what they do best, and not blur the lines between the two.
28
+
29
+
## Processes: Property Bags vs Strongly Typed Steps
30
+
31
+
For v1.0, we've moved away from strongly-typed steps, and leaned in to the key-value-pair Property bag.
32
+
33
+
### Why
34
+
In versions of the provider before v1.0, we experimented with both leaning on the Properties bag when defining a Step, and with providing strongly-typed Resources specific to each step. The result was a compromise between the two approaches: some properties were set via strongly typed attributes, and some needed to be set in the properties bag.
35
+
36
+
It was hard to know which should be set where, and you could easily run into conflicts and state-drift when using a strongly-typed attribute when available (such as the `run_on_server` attribute), where Octopus Server would respond with elements in the property bag.
37
+
38
+
From a maintenance perspective, we currently don't have an easy way to generate these strongly-typed step representations, so each needs to be manually crafted and kept in sync with Octopus Server. This creates a maintenance burden that resulted in a bad experience for our Terraform Provider users.
21
39
22
-
Terraform can’t nicely support all the richness that Version Control and Git provide (managing multiple branches, diverging processes etc).
40
+
For the immediate future, the new Process resource will not have strongly-typed steps, and you'll need to use the properties bag instead. We've provided guidance on how to easily find the right properties for your step.
23
41
24
-
We want to let Version Control do what it does best, and not blur the lines between the two.
42
+
In the medium-longer term, we would like to rearchitect the way our steps are defined in Octopus, which would enable us to lean on code generation to provide strongly typed step resources that are easily kept in sync with Octopus Server. The architectural improvements we've made in the Provider with the new Process resource set us up to be able to adopt strongly-typed steps without the previous state-drift issues, once we're able to do it in a maintainable way.
0 commit comments