Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ resource "octopusdeploy_project" "example" {
### Optional

- `allow_deployments_to_no_targets` (Boolean, Deprecated)
- `auto_create_release` (Boolean)
- `auto_create_release` (Boolean, Deprecated)
- `auto_deploy_release_overrides` (Block List) (see [below for nested schema](#nestedblock--auto_deploy_release_overrides))
- `cloned_from_project_id` (String) The ID of the project this project was cloned from.
- `connectivity_policy` (Block List) (see [below for nested schema](#nestedblock--connectivity_policy))
Expand All @@ -90,7 +90,7 @@ resource "octopusdeploy_project" "example" {
- `is_discrete_channel_release` (Boolean) Treats releases of different channels to the same environment as a separate deployment dimension
- `is_version_controlled` (Boolean)
- `jira_service_management_extension_settings` (Block List) Provides extension settings for the Jira Service Management (JSM) integration for this project. (see [below for nested schema](#nestedblock--jira_service_management_extension_settings))
- `release_creation_strategy` (Block List) (see [below for nested schema](#nestedblock--release_creation_strategy))
- `release_creation_strategy` (Block List, Deprecated) (see [below for nested schema](#nestedblock--release_creation_strategy))
- `release_notes_template` (String)
- `servicenow_extension_settings` (Block List) Provides extension settings for the ServiceNow integration for this project. (see [below for nested schema](#nestedblock--servicenow_extension_settings))
- `slug` (String) A human-readable, unique identifier, used to identify a project.
Expand Down
143 changes: 143 additions & 0 deletions docs/resources/project_auto_create_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "octopusdeploy_project_auto_create_release Resource - terraform-provider-octopusdeploy"
subcategory: ""
description: |-
This resource manages automatic release creation for a project. When enabled, new releases will be automatically created when new versions of the specified packages are available. The referenced packages must use built-in package repository feeds.
---

# octopusdeploy_project_auto_create_release (Resource)

This resource manages automatic release creation for a project. When enabled, new releases will be automatically created when new versions of the specified packages are available. The referenced packages must use built-in package repository feeds.

## Example Usage

```terraform
# Example configuration for octopusdeploy_project_auto_create_release resource

# Basic project setup
resource "octopusdeploy_project_group" "example" {
description = "Example project group for auto create release demo"
name = "Example Project Group"
}

resource "octopusdeploy_lifecycle" "example" {
description = "Example lifecycle"
name = "Example Lifecycle"

release_retention_policy {
quantity_to_keep = 30
should_keep_forever = false
unit = "Days"
}
}

resource "octopusdeploy_environment" "development" {
description = "Development environment"
name = "Development"
}

resource "octopusdeploy_project" "example" {
description = "Example project with auto create release"
lifecycle_id = octopusdeploy_lifecycle.example.id
name = "Example Project with Auto Create Release"
project_group_id = octopusdeploy_project_group.example.id

# Note: auto_create_release is NOT set here - it will be managed by the separate resource
}

# Get the built-in feed
data "octopusdeploy_feeds" "built_in" {
feed_type = "BuiltIn"
take = 1
}

# Channel for the project
resource "octopusdeploy_channel" "default" {
description = "Default channel"
lifecycle_id = octopusdeploy_lifecycle.example.id
name = "Default"
project_id = octopusdeploy_project.example.id
}

# Deployment process with a package step that uses built-in feed
resource "octopusdeploy_deployment_process" "example" {
project_id = octopusdeploy_project.example.id

step {
condition = "Success"
name = "Deploy Package"
package_requirement = "LetOctopusDecide"
start_trigger = "StartAfterPrevious"

action {
action_type = "Octopus.TentaclePackage"
name = "Deploy Package Action"
condition = "Success"
run_on_server = false
is_disabled = false
can_be_used_for_project_versioning = false
is_required = false
worker_pool_id = ""

environments = [octopusdeploy_environment.development.id]
excluded_environments = []
channels = []
tenant_tags = []

package {
name = "MyApp"
package_id = "MyApp"
acquisition_location = "Server"
extract_during_deployment = false
feed_id = data.octopusdeploy_feeds.built_in.feeds[0].id
}

properties = {
"Octopus.Action.EnabledFeatures" = ""
}
}
}
}

# Auto create release configuration
resource "octopusdeploy_project_auto_create_release" "example" {
project_id = octopusdeploy_project.example.id
channel_id = octopusdeploy_channel.default.id

release_creation_package {
deployment_action = octopusdeploy_deployment_process.example.step[0].action[0].name
package_reference = octopusdeploy_deployment_process.example.step[0].action[0].package[0].name
}

# release_creation_package_step_id is computed automatically if not provided
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `channel_id` (String) The ID of the channel in which triggered releases will be created.
- `project_id` (String) The ID of the project for which to enable automatic release creation.

### Optional

- `release_creation_package` (Block List) Configuration for the package that will trigger automatic release creation. The referenced package must use a built-in package repository feed. (see [below for nested schema](#nestedblock--release_creation_package))
- `release_creation_package_step_id` (String) The ID of the deployment step containing the package for release creation.
- `space_id` (String) The space ID where the project is located. If not specified, the default space will be used.

### Read-Only

- `id` (String) The unique identifier for this resource.

<a id="nestedblock--release_creation_package"></a>
### Nested Schema for `release_creation_package`

Required:

- `deployment_action` (String) The name of the deployment action that contains the package reference.
- `package_reference` (String) The name of the package reference within the deployment action.


Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Example configuration for octopusdeploy_project_auto_create_release resource

# Basic project setup
resource "octopusdeploy_project_group" "example" {
description = "Example project group for auto create release demo"
name = "Example Project Group"
}

resource "octopusdeploy_lifecycle" "example" {
description = "Example lifecycle"
name = "Example Lifecycle"

release_retention_policy {
quantity_to_keep = 30
should_keep_forever = false
unit = "Days"
}
}

resource "octopusdeploy_environment" "development" {
description = "Development environment"
name = "Development"
}

resource "octopusdeploy_project" "example" {
description = "Example project with auto create release"
lifecycle_id = octopusdeploy_lifecycle.example.id
name = "Example Project with Auto Create Release"
project_group_id = octopusdeploy_project_group.example.id

# Note: auto_create_release is NOT set here - it will be managed by the separate resource
}

# Get the built-in feed
data "octopusdeploy_feeds" "built_in" {
feed_type = "BuiltIn"
take = 1
}

# Channel for the project
resource "octopusdeploy_channel" "default" {
description = "Default channel"
lifecycle_id = octopusdeploy_lifecycle.example.id
name = "Default"
project_id = octopusdeploy_project.example.id
}

# Deployment process with a package step that uses built-in feed
resource "octopusdeploy_deployment_process" "example" {
project_id = octopusdeploy_project.example.id

step {
condition = "Success"
name = "Deploy Package"
package_requirement = "LetOctopusDecide"
start_trigger = "StartAfterPrevious"

action {
action_type = "Octopus.TentaclePackage"
name = "Deploy Package Action"
condition = "Success"
run_on_server = false
is_disabled = false
can_be_used_for_project_versioning = false
is_required = false
worker_pool_id = ""

environments = [octopusdeploy_environment.development.id]
excluded_environments = []
channels = []
tenant_tags = []

package {
name = "MyApp"
package_id = "MyApp"
acquisition_location = "Server"
extract_during_deployment = false
feed_id = data.octopusdeploy_feeds.built_in.feeds[0].id
}

properties = {
"Octopus.Action.EnabledFeatures" = ""
}
}
}
}

# Auto create release configuration
resource "octopusdeploy_project_auto_create_release" "example" {
project_id = octopusdeploy_project.example.id
channel_id = octopusdeploy_channel.default.id

release_creation_package {
deployment_action = octopusdeploy_deployment_process.example.step[0].action[0].name
package_reference = octopusdeploy_deployment_process.example.step[0].action[0].package[0].name
}

# release_creation_package_step_id is computed automatically if not provided
}
1 change: 1 addition & 0 deletions octopusdeploy_framework/framework_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func (p *octopusDeployFrameworkProvider) Resources(ctx context.Context) []func()
NewDeploymentFreezeTenantResource,
NewGitTriggerResource,
NewBuiltInTriggerResource,
NewProjectAutoCreateReleaseResource,
}
}

Expand Down
Loading
Loading