Skip to content

Commit

Permalink
fix: Add Git trigger example (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
lourens-octopus authored Dec 15, 2024
1 parent da3bf7f commit 39c5b32
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/resources/git_trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,29 @@ description: |-

This resource manages Git triggers in Octopus Deploy


## Example Usage

```terraform
resource "octopusdeploy_git_trigger" "my_trigger" {
name = "My Git trigger"
space_id = "Spaces-1"
description = "My Git trigger description"
project_id = "Projects-1"
channel_id = "Channels-1"
sources {
deployment_action_slug = "deploy-action-slug"
git_dependency_name = ""
include_file_paths = [
"include/me",
"include/this/too"
]
exclude_file_paths = [
"exclude/me",
"exclude/this/too"
]
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -42,4 +64,10 @@ Required:
- `git_dependency_name` (String) The git dependency name.
- `include_file_paths` (List of String) The file paths to include.

## Import

Import is supported using the following syntax:

```shell
terraform import [options] octopusdeploy_git_trigger.<name> <trigger-id>
```
1 change: 1 addition & 0 deletions examples/resources/octopusdeploy_git_trigger/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import [options] octopusdeploy_git_trigger.<name> <trigger-id>
19 changes: 19 additions & 0 deletions examples/resources/octopusdeploy_git_trigger/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
resource "octopusdeploy_git_trigger" "my_trigger" {
name = "My Git trigger"
space_id = "Spaces-1"
description = "My Git trigger description"
project_id = "Projects-1"
channel_id = "Channels-1"
sources {
deployment_action_slug = "deploy-action-slug"
git_dependency_name = ""
include_file_paths = [
"include/me",
"include/this/too"
]
exclude_file_paths = [
"exclude/me",
"exclude/this/too"
]
}
}

0 comments on commit 39c5b32

Please sign in to comment.