Skip to content

Add custom field definitions to channel#193

Closed
caitlynstocker wants to merge 4 commits into
mainfrom
cat/devex-147/add-custom-fields-to-channels
Closed

Add custom field definitions to channel#193
caitlynstocker wants to merge 4 commits into
mainfrom
cat/devex-147/add-custom-fields-to-channels

Conversation

@caitlynstocker

@caitlynstocker caitlynstocker commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Pending advice from Modern Deployments. Please hold off on reviewing for now 🛑

Background 🌇

Custom field definitions were added to Channels as part of the Ephemeral Environments project, as a way to require custom fields on a release made into an ephemeral environment channel. The values for the custom fields on a release can then be used to name (or set other values within?) the ephemeral environments created from the release.

What's this? 🌵

We want to enable terraform users to set custom field definitions on channels in their terraform configuration.

What it should be doing so far is:
〰️ adding CustomFieldDefinitions to the Channel schema
〰️ adding expander and flattener functions for CustomFieldDefinitions
〰️ referencing these inside the Channel expander and flattener functions.

How to review 🔍

🚩 Carefully! This is my first time touching terraform or the go client. I've checked the changes carefully but it is very much a claude special.
🧪 You can test this by creating a channel in terraform and adding, editing and removing custom field definitions. Example terraform config:

resource "octopusdeploy_channel" "example" {
  name       = "Development Channel (OK to Delete)"
  project_id = "Projects-1"

  custom_field_definitions = [
    {
      field_name  = "Ticket Number"
      description = "The issue tracker ticket number associated with this deployment"
    },
    {
      field_name  = "Ticket Number 2"
      description = "Hello"
    }
  ]
}

Completes DEVEX-147

Comment thread docs/resources/channel.md
- `field_name` (String) The name of the custom field.


<a id="nestedblock--rule"></a>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Autogenerated docs changes.

@caitlynstocker caitlynstocker changed the title Add custom fields to channel entity Add custom field definitions to channel Apr 2, 2026
Comment thread go.mod

require (
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.0
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.1-0.20260410024644-845b3652cb8c

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This needs to be updated to point to the latest release once changes to the go client are completed.

Comment thread go.sum
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.0 h1:KfQngSy4tnjRfHJldIcxxE+DKeiMsJHu/1PTub/kKc8=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.0/go.mod h1:VkTXDoIPbwGFi5+goo1VSwFNdMVo784cVtJdKIEvfus=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.1-0.20260410024644-845b3652cb8c h1:6102d7f5d46u8pNkwSDQOrZSh8ACSRYOBmnOFTa7anc=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.105.1-0.20260410024644-845b3652cb8c/go.mod h1:VkTXDoIPbwGFi5+goo1VSwFNdMVo784cVtJdKIEvfus=

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will be removed once we are using the new release of the go client.

@caitlynstocker

Copy link
Copy Markdown
Contributor Author

Replaced by #200

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