Skip to content

Commit

Permalink
chore: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 committed Dec 4, 2024
1 parent 61c9d19 commit 210927a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/resources/project_versioning_strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ description: |-

# octopusdeploy_project_versioning_strategy (Resource)



## Example Usage

```terraform
resource "octopusdeploy_project_group" "tp" {
name = "DevOps Projects"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
resource "octopusdeploy_project_group" "tp" {
name = "DevOps Projects"
description = "My DevOps projects group"
}

resource "octopusdeploy_project" "tp" {
name = "My DevOps Project"
description = "test project"
lifecycle_id = "Lifecycles-1"
project_group_id = octopusdeploy_project_group.tp.id

depends_on = [octopusdeploy_project_group.tp]
}

resource "octopusdeploy_deployment_process" "process" {
project_id = octopusdeploy_project.tp.id

step {
name = "Hello World"
target_roles = [ "hello-world" ]
start_trigger = "StartAfterPrevious"
package_requirement = "LetOctopusDecide"
condition = "Success"

run_script_action {
name = "Hello World"
is_disabled = false
is_required = true
script_body = "Write-Host 'hello world'"
script_syntax = "PowerShell"
can_be_used_for_project_versioning = true
sort_order = 1


package {
name = "Package"
feed_id = "feeds-builtin"
package_id = "myExpressApp"
acquisition_location = "Server"
extract_during_deployment = true
}
}
}

depends_on = [octopusdeploy_project.tp]
}

resource "octopusdeploy_project_versioning_strategy" "tp" {
project_id = octopusdeploy_project.tp.id
space_id = octopusdeploy_project.tp.space_id
donor_package_step_id = octopusdeploy_deployment_process.process.step[0].run_script_action[0].id
donor_package = {
deployment_action = "Hello World"
package_reference = "Package"
}
depends_on = [
octopusdeploy_project_group.tp,
octopusdeploy_deployment_process.process
]
}

0 comments on commit 210927a

Please sign in to comment.