From e4d2a47add371231e5ac2109fdd27391df044cb5 Mon Sep 17 00:00:00 2001 From: Travis Leeden Date: Wed, 27 Mar 2024 10:51:13 +1000 Subject: [PATCH] Add back lost information in docs after generating them --- .../external_feed_create_release_trigger.md | 35 +++++++++++++++---- docs/resources/project_scheduled_trigger.md | 8 ++--- .../import.sh | 1 + .../resource.tf | 14 ++++++++ ...ce_external_feed_create_release_trigger.go | 1 + .../resource_project_scheduled_trigger.go | 1 + ...ternal_feed_create_release_trigger.md.tmpl | 23 ++++++++++++ .../project_scheduled_trigger.md.tmpl | 23 ++++++++++++ 8 files changed, 94 insertions(+), 12 deletions(-) create mode 100644 examples/resources/octopusdeploy_external_feed_create_release_trigger/import.sh create mode 100644 examples/resources/octopusdeploy_external_feed_create_release_trigger/resource.tf create mode 100644 templates/resources/external_feed_create_release_trigger.md.tmpl create mode 100644 templates/resources/project_scheduled_trigger.md.tmpl diff --git a/docs/resources/external_feed_create_release_trigger.md b/docs/resources/external_feed_create_release_trigger.md index 3e190469d..e6b02d6c1 100644 --- a/docs/resources/external_feed_create_release_trigger.md +++ b/docs/resources/external_feed_create_release_trigger.md @@ -1,17 +1,32 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "octopusdeploy_external_feed_create_release_trigger Resource - terraform-provider-octopusdeploy" -subcategory: "" +subcategory: "Triggers" description: |- - + This resource manages External feed triggers (release creation type) in Octopus Deploy. --- # octopusdeploy_external_feed_create_release_trigger (Resource) - - - - +This resource manages External feed triggers (release creation type) in Octopus Deploy. + +## Example Usage + +```terraform +resource "octopusdeploy_external_feed_create_release_trigger" "my_trigger" { + name = "My feed trigger" + space_id = "Spaces-1" + project_id = "Projects-2" + package { + deployment_action = "My Helm step" + package_reference = "nginx" + } + package { + deployment_action = "My container step" + package_reference = "busybox" + } + channel_id = "Channels-21" +} +``` ## Schema @@ -39,4 +54,10 @@ Optional: - `deployment_action` (String) - `package_reference` (String) +## Import + +Import is supported using the following syntax: +```shell +terraform import [options] octopusdeploy_external_feed_create_release_trigger. +``` diff --git a/docs/resources/project_scheduled_trigger.md b/docs/resources/project_scheduled_trigger.md index 5bdd005bf..a6a8a56b0 100644 --- a/docs/resources/project_scheduled_trigger.md +++ b/docs/resources/project_scheduled_trigger.md @@ -1,14 +1,13 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "octopusdeploy_project_scheduled_trigger Resource - terraform-provider-octopusdeploy" -subcategory: "" +subcategory: "Triggers" description: |- - + This resource manages a scheduled trigger for a project or runbook in Octopus Deploy. --- # octopusdeploy_project_scheduled_trigger (Resource) - +This resource manages a scheduled trigger for a project or runbook in Octopus Deploy. ## Example Usage @@ -84,7 +83,6 @@ resource "octopusdeploy_project_scheduled_trigger" "runbook_example" { } } ``` - ## Schema diff --git a/examples/resources/octopusdeploy_external_feed_create_release_trigger/import.sh b/examples/resources/octopusdeploy_external_feed_create_release_trigger/import.sh new file mode 100644 index 000000000..4ac902242 --- /dev/null +++ b/examples/resources/octopusdeploy_external_feed_create_release_trigger/import.sh @@ -0,0 +1 @@ +terraform import [options] octopusdeploy_external_feed_create_release_trigger. \ No newline at end of file diff --git a/examples/resources/octopusdeploy_external_feed_create_release_trigger/resource.tf b/examples/resources/octopusdeploy_external_feed_create_release_trigger/resource.tf new file mode 100644 index 000000000..57fa1baed --- /dev/null +++ b/examples/resources/octopusdeploy_external_feed_create_release_trigger/resource.tf @@ -0,0 +1,14 @@ +resource "octopusdeploy_external_feed_create_release_trigger" "my_trigger" { + name = "My feed trigger" + space_id = "Spaces-1" + project_id = "Projects-2" + package { + deployment_action = "My Helm step" + package_reference = "nginx" + } + package { + deployment_action = "My container step" + package_reference = "busybox" + } + channel_id = "Channels-21" +} \ No newline at end of file diff --git a/octopusdeploy/resource_external_feed_create_release_trigger.go b/octopusdeploy/resource_external_feed_create_release_trigger.go index eadc1620a..28e01c6a4 100644 --- a/octopusdeploy/resource_external_feed_create_release_trigger.go +++ b/octopusdeploy/resource_external_feed_create_release_trigger.go @@ -17,6 +17,7 @@ func resourceExternalFeedCreateReleaseTrigger() *schema.Resource { return &schema.Resource{ CreateContext: resourceExternalFeedCreateReleaseTriggerCreate, DeleteContext: resourceExternalFeedCreateReleaseTriggerDelete, + Description: "This resource manages External feed triggers (release creation type) in Octopus Deploy.", Importer: getImporter(), ReadContext: resourceExternalFeedCreateReleaseTriggerRead, Schema: getExternalFeedCreateReleaseTriggerSchema(), diff --git a/octopusdeploy/resource_project_scheduled_trigger.go b/octopusdeploy/resource_project_scheduled_trigger.go index 9796a9970..cd17a829e 100644 --- a/octopusdeploy/resource_project_scheduled_trigger.go +++ b/octopusdeploy/resource_project_scheduled_trigger.go @@ -12,6 +12,7 @@ func resourceProjectScheduledTrigger() *schema.Resource { return &schema.Resource{ CreateContext: resourceProjectScheduledTriggerCreate, DeleteContext: resourceProjectScheduledTriggerDelete, + Description: "This resource manages a scheduled trigger for a project or runbook in Octopus Deploy.", Importer: getImporter(), ReadContext: resourceProjectScheduledTriggerRead, Schema: getProjectScheduledTriggerSchema(), diff --git a/templates/resources/external_feed_create_release_trigger.md.tmpl b/templates/resources/external_feed_create_release_trigger.md.tmpl new file mode 100644 index 000000000..513b7aab6 --- /dev/null +++ b/templates/resources/external_feed_create_release_trigger.md.tmpl @@ -0,0 +1,23 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "Triggers" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }} +{{- end }} diff --git a/templates/resources/project_scheduled_trigger.md.tmpl b/templates/resources/project_scheduled_trigger.md.tmpl new file mode 100644 index 000000000..513b7aab6 --- /dev/null +++ b/templates/resources/project_scheduled_trigger.md.tmpl @@ -0,0 +1,23 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "Triggers" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} +{{ .SchemaMarkdown | trimspace }} + +{{ if .HasImport -}} +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }} +{{- end }}