Skip to content

feat: declare the scope's available actions in its spec - #21

Merged
agustincelentano merged 1 commit into
mainfrom
feat/declare-available-actions
Aug 3, 2026
Merged

feat: declare the scope's available actions in its spec#21
agustincelentano merged 1 commit into
mainfrom
feat/declare-available-actions

Conversation

@agustincelentano

Copy link
Copy Markdown
Contributor

Declares the actions this scope offers inside its own spec, so the
scope_definition module can read them instead of carrying a hardcoded default.

Seven actions, matching both the templates in static-files/specs/actions/ and the
specifications currently registered for this scope:

create-scope  delete-scope
start-initial  start-blue-green  finalize-blue-green
rollback-deployment  delete-deployment

Verified that the rendered spec parses as JSON and that every name has its
.json.tpl.

Merge order

Needs nullplatform/tofu-modules#458, which makes the module read this field.
Until that merges this changes nothing, and it is harmless on its own.

The reverse is not true: that PR removes the module's default, so a scope whose
spec does not declare available_actions ends up with an empty list — and an empty
list in a for_each destroys every action specification. This scope had seven at
risk.

🤖 Generated with Claude Code

The list of actions a scope offers lived in the scope_definition module as a
hardcoded default, far from the scope that implements them. Declaring it here puts
the list next to the action templates it names.

The seven match the templates in specs/actions and the specifications currently
registered for this scope.

Requires the module to read the field: nullplatform/tofu-modules#458.

@sebastiancorrea81 sebastiancorrea81 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@agustincelentano
agustincelentano merged commit 926bfdc into main Aug 3, 2026
5 checks passed
@agustincelentano
agustincelentano deleted the feat/declare-available-actions branch August 3, 2026 15:16
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.

3 participants