Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Built-in trigger #846

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Built-in trigger #846

wants to merge 3 commits into from

Conversation

denys-octopus
Copy link
Contributor

Introduces new resource to represent built-in trigger for the project.
"Built-in Trigger" is new representation of "Auto Release Creation" where new version of selected package will create new release for the project.

resource "octopusdeploy_built_in_trigger" "console" {
  project_id = octopusdeploy_project.example.id
  channel_id = octopusdeploy_channel.example.id
  
  release_creation_package = {
    deployment_action = "Example Action"
    package_reference = "example.package"
  }

  depends_on = [
    octopusdeploy_project.example,
    octopusdeploy_channel.example,
    octopusdeploy_deployment_process.example
  ]
}

Set "id" to the action package reference when exists, without it new id is always generated and deployment process update will fail if package is referenced by built-in trigger
if id, ok := tfPkg["id"]; ok {
pkg.ID = id.(string)
}

Copy link
Contributor Author

@denys-octopus denys-octopus Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that ☝️ , updating of deployment process resource would fail, because new id will be generated every time when updating deployment process and because old id is referenced by built-in trigger deployment process will prevent to replace it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant