diff --git a/docs/resources/script_module.md b/docs/resources/script_module.md index 15d81fb84..a9f4357f1 100644 --- a/docs/resources/script_module.md +++ b/docs/resources/script_module.md @@ -24,6 +24,41 @@ resource "octopusdeploy_script_module" "example" { } ``` +To include the script module in a project: +```terraform +resource "octopusdeploy_project" "example-project" { + auto_create_release = false + default_guided_failure_mode = "EnvironmentDefault" + default_to_skip_if_already_installed = false + description = "The development project." + discrete_channel_release = false + is_disabled = false + is_discrete_channel_release = false + is_version_controlled = false + lifecycle_id = "Lifecycles-342" + name = "Development Project (OK to Delete)" + project_group_id = "ProjectGroups-342" + tenanted_deployment_participation = "TenantedOrUntenanted" + included_library_variable_sets = [octopusdeploy_script_module.example.id] + + connectivity_policy { + allow_deployments_to_no_targets = false + exclude_unhealthy_targets = false + skip_machine_behavior = "SkipUnavailableMachines" + } + + template { + default_value = "example-default-value" + help_text = "example-help-test" + label = "example-label" + name = "example-template-value" + display_settings = { + "Octopus.ControlType" : "SingleLineText" + } + } +} +``` + ## Schema diff --git a/examples/resources/octopusdeploy_project/resource.tf b/examples/resources/octopusdeploy_project/resource.tf index 33007b051..fe45117f3 100644 --- a/examples/resources/octopusdeploy_project/resource.tf +++ b/examples/resources/octopusdeploy_project/resource.tf @@ -11,6 +11,8 @@ resource "octopusdeploy_project" "example" { name = "Development Project (OK to Delete)" project_group_id = "ProjectGroups-123" tenanted_deployment_participation = "TenantedOrUntenanted" + included_library_variable_sets = [ "LibraryVariablesSets-456", "LibraryVariablesSets-789" ] + connectivity_policy { allow_deployments_to_no_targets = false