Skip to content
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

Extend atmos terraform clean to clean up custom paths #1016

Open
osterman opened this issue Feb 4, 2025 · 0 comments
Open

Extend atmos terraform clean to clean up custom paths #1016

osterman opened this issue Feb 4, 2025 · 0 comments

Comments

@osterman
Copy link
Member

osterman commented Feb 4, 2025

Describe the Feature

The atmos terraform clean command will clean up some well-known paths. However, running terraform commands and result in other temporary files getting created.

With this feature, atmos can clean up any files relative to the component's directory.

Path traversals (../../../../etc/passwd) are not allowed.

# atmos.yaml
terraform:
  clean:
    paths:
    - cache.txt
    - **/*.zip

Expected Behavior

Running atmos terraform clean will purge all well-known locations (like it does now), in addition to matching any of the terraform.clean.paths configured.

Use Case

  • Terraform component used to provision a lambda produces a .zip file that is orphaned
  • Terraform component writes some temporary files that are not cleaned up

Describe Ideal Solution

Modify the Atmos config to support the following:

# atmos.yaml
terraform:
  clean:
    paths:
    - cache.txt
    - **/*.zip

Alternatives Considered

We could create a "custom command" that also does this, but it's better that we have a core feature.

Additional Context

No response

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

No branches or pull requests

1 participant