-
-
Notifications
You must be signed in to change notification settings - Fork 137
Closed
Labels
bug🐛 An issue with the system🐛 An issue with the system
Description
Describe the Bug
Area: terraform backend / abstract-component instances
Type: bug (likely regression)
- Versions: Affects Atmos 1.194.0 (worked on 1.193.0).
- Scenario: stacks using an abstract component (e.g.
eks/service/defaultswithmetadata.component: eks/service)
plus a named instance (e.g.eks/service/<name>). - In 1.194.0, the backend
workspace_key_prefixis derived from the abstract path
(e.g.eks-service-defaults) instead of the concrete/metadata component (e.g.eks-service). - This changes the S3 state location from the existing prefix
/eks-service/...to a new prefix
/eks-service-defaults/.... - Atmos/tofu then initializes a new empty state at the new prefix (~small file;
tofu state listempty),
andplanshows create-only / full re-create. - On 1.193.0, the backend used
eks-serviceand correctly found the existing state. - Net effect: applying plans from 1.194.0 can duplicate resources or fail with conflicts because the
real state isn’t found.
Example effect:
- Old/expected state prefix: /eks-service/... (has real state)
- New/actual state prefix: /eks-service-defaults/...
Expected Behavior
Use the concrete component identity (e.g. eks/service → eks-service) so existing instances find their current state.
Steps to Reproduce
- Define abstract eks/service/defaults with metadata.component: eks/service and a named instance eks/service/apps inheriting it.
- Run on 1.193.0 → backend shows workspace_key_prefix: eks-service; state is found.
- Run on 1.194.0 → backend shows workspace_key_prefix: eks-service-defaults; new empty state is created; plan wants to create everything.
Code block:
components:
terraform:
eks/service/defaults:
metadata:
type: abstract
component: eks/serviceimport:
- catalog/eks/service/defaults
components:
terraform:
eks/service/begonia-clipfe:
metadata:
component: eks/service
inherits:
- eks/service/defaults
- eks/helm-teleport-helperScreenshots
#image:1 - no IaC state file available
##############################
image:2 - describe component output
##############################
#image:3 - S3 listings with both prefixes
###############################
#image:4 - backend.tf.json on 1.194.0
Environment
Atmos 1.194.0
Additional Context
Screenshots showing: backend.tf.json on 1.194.0, S3 listings with both prefixes, describe component output, and tofu state list (empty on new prefix).
Metadata
Metadata
Assignees
Labels
bug🐛 An issue with the system🐛 An issue with the system