diff --git a/docs/resources/git_trigger.md b/docs/resources/git_trigger.md index 6376c904..04644c73 100644 --- a/docs/resources/git_trigger.md +++ b/docs/resources/git_trigger.md @@ -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 @@ -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. +``` diff --git a/examples/resources/octopusdeploy_git_trigger/import.sh b/examples/resources/octopusdeploy_git_trigger/import.sh new file mode 100644 index 00000000..38f0466b --- /dev/null +++ b/examples/resources/octopusdeploy_git_trigger/import.sh @@ -0,0 +1 @@ +terraform import [options] octopusdeploy_git_trigger. \ No newline at end of file diff --git a/examples/resources/octopusdeploy_git_trigger/resource.tf b/examples/resources/octopusdeploy_git_trigger/resource.tf new file mode 100644 index 00000000..beee5ed5 --- /dev/null +++ b/examples/resources/octopusdeploy_git_trigger/resource.tf @@ -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" + ] + } +}