-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Command for Listing Stacks #395
Comments
@RoseSecurity thank you for testing Atmos and opening this issue. The command We agree that the filtering is not ideal, and we'll improve it to make it easier to filter for anything and output in any format. For example. output just the stack names, which is not supported now as you described above, but here is what supported and you can use it to get the stack names with a little help from atmos describe stacks --sections none --component-types terraform If you use tenant2-ue2-dev:
components:
terraform:
infra/vpc: {}
mixin/test-1: {}
mixin/test-2: {}
test/test-component: {}
test/test-component-override: {}
test/test-component-override-2: {}
test/test-component-override-3: {}
top-level-component1: {}
vpc: {}
tenant2-ue2-prod:
components:
terraform:
infra/vpc: {}
infrastructure-tenant2: {}
mixin/test-1: {}
mixin/test-2: {}
spacelift-defaults: {}
test/test-component: {}
test/test-component-override: {}
test/test-component-override-2: {}
test/test-component-override-3: {}
top-level-component1: {}
vpc: {}
tenant2-ue2-staging:
components:
terraform:
infra/vpc: {}
mixin/test-1: {}
mixin/test-2: {}
test/test-component: {}
test/test-component-override: {}
test/test-component-override-2: {}
test/test-component-override-3: {}
top-level-component1: {}
vpc: {} To see what stacks have a particular component, you can run: atmos describe stacks --sections none --components top-level-component1 tenant1-ue2-dev:
components:
terraform:
top-level-component1: {}
tenant1-ue2-prod:
components:
terraform:
top-level-component1: {}
tenant1-ue2-staging:
components:
terraform:
top-level-component1: {}
tenant2-ue2-dev:
components:
terraform:
top-level-component1: {}
tenant2-ue2-prod:
components:
terraform:
top-level-component1: {}
tenant2-ue2-staging:
components:
terraform:
top-level-component1: {} To get a particular section for the component, e.g. atmos describe stacks --sections vars --components top-level-component1 tenant2-ue2-dev:
components:
terraform:
top-level-component1:
vars:
enabled: true
environment: ue2
namespace: cp
region: us-east-2
service_1_name: top-level-service-1
service_2_name: top-level-service-2
stage: dev
tenant: tenant2
tenant2-ue2-prod:
components:
terraform:
top-level-component1:
vars:
enabled: true
environment: ue2
namespace: cp
region: us-east-2
service_1_name: top-level-service-1
service_2_name: top-level-service-2
stage: prod
tenant: tenant2
tenant2-ue2-staging:
components:
terraform:
top-level-component1:
vars:
enabled: true
environment: ue2
namespace: cp
region: us-east-2
service_1_name: top-level-service-1
service_2_name: top-level-service-2
stage: staging
tenant: tenant2 So, although the filtering is not perfect and we'll be improving it, you can use the References: |
Thank you for this informative answer @aknysh! I'm excited to see how tool continues to develop and thank you for your assistance with those useful commands. |
Describe the Feature
Would it be possible to incorporate a command for listing available stacks? I have been utilizing
atmos describe stacks | grep -e '^\S' | sed s/://g
to get a complete list of stacks, but if this could be incorporated as a command, it would be an awesome feature!I am sure there is a more eloquent way of doing it, but even if the output of the
atmos describe
was passed to another function for parsing, this would be beneficial.Expected Behavior
When the command is ran, the terminal output would appear as the following:
Use Case
It is difficult to know what stacks are available
Describe Ideal Solution
Please see above
Alternatives Considered
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: