Skip to content

Commit

Permalink
chore: example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 committed Dec 4, 2024
1 parent 6b76c98 commit 61c9d19
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/resources/project_versioning_strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,69 @@ description: |-

# octopusdeploy_project_versioning_strategy (Resource)

## Example Usage
```terraform
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
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down

0 comments on commit 61c9d19

Please sign in to comment.