8000 Provider Configuration Not Inherited When Using Abstract Components and Context Provider · Issue #1143 · cloudposse/atmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Provider Configuration Not Inherited When Using Abstract Components and Context Provider #1143

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

Open
mirageAlchemy opened this issue Mar 13, 2025 · 0 comments
Labels 8000
bug 🐛 An issue with the system

Comments

@mirageAlchemy
Copy link

Describe the Bug

When inheriting an abstract component (demo) with a providers configuration in the Cloud Posse demo(the demo itself does not inherit but rather override), the name: petset value from the abstract component is not merged into the final providers configuration of the inheriting component. Other variables (e.g., pet: "dog") are inherited, but the name field from the context provider is missing.

Expected Behavior

The providers section should deep-merge the name: petset from the abstract component and the environment: dev from the stack, resulting in:

providers:
  context:
    values:
      name: petset
      environment: dev
      support_email: dev-support@acme.com

Steps to Reproduce

  1. Define the abstract component (catalog/demo.yaml):

    components:
      terraform:
        demo:
          metadata:
            type: abstract
            component: petset
          providers:
            context:
              values:
                name: petset
          vars:
            pet: "dog"
  2. Define the stack (deploy/dev/demo.yaml):

     # yaml-language-server: $schema=https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json
    
     import:
     - ../_defaults
     - catalog/demo
     - mixins/west-coast
    
     terraform:
       providers:
         context:
           values:
             environment: dev
             support_email: dev-support@acme.com
    
     components:
       terraform:
         demo-new: # this was `demo` in original demo
           metadata:
             inherits: # this was missing in the original demo
               - demo
             type: real
           vars:
             size: 3
  3. Run atmos describe component demo -s deploy/dev.

  4. Observe that the name: petset value is missing in the providers.context.values section.

Screenshots

No response

Environment

OS: Linux/macOS (tested in Cloud Posse demo environment)
Atmos Version: 1.165.2+
Context Provider Configuration: same as in the demo

Additional Context

No response

@mirageAlchemy mirageAlchemy added the bug 🐛 An issue with the system label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant
0