-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Remote sources for components #598
Comments
@osterman @aknysh @nitrocode -- Would be interested in your folks thoughts on this one! |
This has come up from a handful of people lately in the community. Clearly it's a popular feature for users migrating from a Terragrunt ecosystem. This is supported today by combining 2 concepts.
How it's different from Terragrunt
How we could improve it?
Why Not Define Vendoring in Stack Configurations?We deliberately did not add the
|
See: https://atmos.tools/core-concepts/components/vendoring#vendoring-modules-as-components |
@osterman My problem with this is adding potentially hundreds of lines of code to our repo that we have no immediate need to modify. Makes for a large, difficult to actually verify PR. |
@kevcube committing the files is not required if using component.yaml, and mitigated from a code review perspective using See https://sweetops.slack.com/archives/C031919U8A0/p1714589350835659 Option 1: Vendor and CommitBy default, Cloud Posse (in our engagements and refarch), vendor the everything in to the repositories. Pros
Cons
Option 2: Vendoring Just In TimeVendoring components (or anything for that fact, which is supported by atmos) can be done "Just in time", more or less like terraform init for provider and modules. Pros:
Cons
Option 3: Hybrid
|
Should components be able to have their own
|
Imagine a
Then in a stack configuration for
Then in a stack configuration for
And then running Or using release channels,
|
How would overrides pattern work, if you want to use vendoring as proposed? Note Monkey patching is an anti-pattern, but is supported Option 1Without any signficant changes to atmos, in your vendoring config, ensure you have
Place your Option 2Without any signficant changes to atmos, in your vendoring config, ensure you have:
In this example, local files stored in You don't have to use |
Describe the Feature
This is a similar idea to what Terragrunt does with their "Remote Terraform Configurations" feature: https://terragrunt.gruntwork.io/docs/features/keep-your-terraform-code-dry/#remote-terraform-configurations
The idea would be that you could provide a URL to a given root module and use that to create a component instance instead of having that component available locally in the atmos project repo.
The benefit here is that you don't need to vendor in the code for that root module. Vendoring is great when you're going to make changes to a configuration, BUT if you're not making any changes then it just creates large PRs that are hard to review and doesn't provide much value.
Another benefit: I have team members that strongly dislike creating root modules that are simply slim wrappers of a single child module because then we're in the game of maintaining a very slim wrapper. @kevcube can speak to that if there is interest to understand more there.
Expected Behavior
Today all non-custom root module usage is done through vendoring in Atmos, so no similar expected behavior AFAIK.
Use Case
Help avoid vendoring in code that you're not changing and therefore not polluting the atmos project with additional code that is unchanged.
Describe Ideal Solution
I'm envisioning this would work like the following with the
$COMPONENT_NAME.metadata.url
being the only change to the schema. Maybe we also need aversion
attribute as well, but TBD.Running atmos against this configuration would result in atmos cloning that root module down to the local in a temporary cache and then using that cloned root module as the source to run
terraform
ortofu
against.Alternatives Considered
None.
Additional Context
None.
The text was updated successfully, but these errors were encountered: