make rvn-stack workspace settings immutable#65
Merged
Merged
Conversation
Ravion Module Publish PlanDry run only. No Ravion API mutations were made.
Diffsrvn-stack 1.2.3 -> 1.2.4--- remote
+++ compiled
- default: true
description: Use Ravion-managed state. Your Terraform configuration must include an empty `terraform { cloud {} }` block; Ravion supplies the workspace configuration. Disable to use your own backend, including S3 or Terraform Cloud.
id: use_ravion_state_backend
+ immutable: true
label: Use Ravion for your Terraform state
type: boolean
- collapsible: true
description: Override Terraform state backend workspace name. Defaults to project + environment + module given ids.
id: ravion_state_backend_workspace
+ immutable: true
label: Ravion Terraform workspace name
show_when:
use_ravion_state_backend: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greptile Summary
This PR marks two Terraform state backend workspace settings —
use_ravion_state_backendandravion_state_backend_workspace— asimmutable: truein thervn-stack-definition.ymlmodule definition, preventing users from changing the state backend configuration after a stack is initially created.use_ravion_state_backend(boolean, defaulttrue) is now locked at creation time, preventing any switch between Ravion-managed state and a self-managed backend after deployment.ravion_state_backend_workspace(string, optional, no default in YAML) is also locked; since the field is only visible whenuse_ravion_state_backendistrue, it must be set during initial configuration or it will remain unset permanently.Confidence Score: 4/5
Safe to merge with a minor clarification needed: the optional workspace name field can be permanently left unset once immutability is enforced.
The change is minimal and intentional — locking the Terraform state backend settings prevents dangerous mid-lifecycle state migrations. The only concern is that
ravion_state_backend_workspace, being optional and shown only conditionally, could end up permanently unset if a user skips it at creation time. Whether this is acceptable depends on how the platform handles the absence of this field at runtime.stack/terraform/rvn-stack-definition.yml — specifically the interaction between
immutable: trueand the optionality ofravion_state_backend_workspace.Important Files Changed
immutable: truetouse_ravion_state_backendandravion_state_backend_workspaceworkspace settings to prevent changes after initial configuration.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User creates stack] --> B{use_ravion_state_backend?} B -- "true (default)" --> C[Ravion manages state backend] B -- "false" --> D[User manages own backend] C --> E{ravion_state_backend_workspace set?} E -- "yes" --> F[Use custom workspace name] E -- "no" --> G[Use default: project+env+module ids] F --> H[🔒 immutable: true — cannot change] G --> H D --> I[🔒 immutable: true — cannot change] C --> I2[🔒 immutable: true — cannot change]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[User creates stack] --> B{use_ravion_state_backend?} B -- "true (default)" --> C[Ravion manages state backend] B -- "false" --> D[User manages own backend] C --> E{ravion_state_backend_workspace set?} E -- "yes" --> F[Use custom workspace name] E -- "no" --> G[Use default: project+env+module ids] F --> H[🔒 immutable: true — cannot change] G --> H D --> I[🔒 immutable: true — cannot change] C --> I2[🔒 immutable: true — cannot change]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "make rvn-stack workspace settings immuta..." | Re-trigger Greptile