Skip to content

Commit

Permalink
fix: Add Git trigger example
Browse files Browse the repository at this point in the history
  • Loading branch information
lourens-octopus committed Dec 15, 2024
1 parent da3bf7f commit 962f69d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
24 changes: 23 additions & 1 deletion docs/resources/git_trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ 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/me/too"]
exclude_file_paths = ["exclude/me", "exclude/me/too"]
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -42,4 +58,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>
13 changes: 13 additions & 0 deletions examples/resources/octopusdeploy_git_trigger/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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/me/too"]
exclude_file_paths = ["exclude/me", "exclude/me/too"]
}
}

0 comments on commit 962f69d

Please sign in to comment.