aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.54k stars 417 forks source link

Better grouping of resources under `app show` #764

Open SoManyHs opened 4 years ago

SoManyHs commented 4 years ago

Currently, running app show --resources shows all the CFN resources in an unsorted/ungrouped list:

$ ecs-preview app show --resources
About

  Project           backend
  Name              brownies
  Type              Load Balanced Web App

Configurations

  Environment       Tasks               CPU (vCPU)          Memory (MiB)        Port
  hotdog            1                   0.25                512                 80

Routes

  Environment       URL
  hotdog            http://backe-Publi-VQOQEJSO2KSV-1065961374.us-east-2.elb.amazonaws.com/brownies

Variables

  Name                        Environment         Value
  ECS_APP_DISCOVERY_ENDPOINT  hotdog              backend.local
  ECS_CLI_APP_NAME            hotdog              brownies
  ECS_CLI_ENVIRONMENT_NAME    hotdog              hotdog
  ECS_CLI_LB_DNS              hotdog              backe-Publi-VQOQEJSO2KSV-1065961374.us-east-2.elb.amazonaws.com
  ECS_CLI_PROJECT_NAME        hotdog              backend

Resources

  hotdog
    AWS::IAM::Role                             backend-hotdog-brownies-CustomResourceRole-1BLCINGWXTAJQ
    AWS::ServiceDiscovery::Service             srv-ygsyevzpwdxcunvh
    AWS::IAM::Role                             backend-hotdog-brownies-ExecutionRole-1BGL72COFIILB
    AWS::ElasticLoadBalancingV2::ListenerRule  arn:aws:elasticloadbalancing:us-east-2:794715269151:listener-rule/app/backe-Publi-VQOQEJSO2KSV/21c607cfc2bf7045/40d67384b716519d/8eedc5e4bcac9524
    AWS::Logs::LogGroup                        /ecs/backend-hotdog-brownies
    AWS::Lambda::Function                      backend-hotdog-brownies-RulePriorityFunction-3A33V37UGQY6
    AWS::ECS::Service                          arn:aws:ecs:us-east-2:794715269151:service/backend-hotdog-Cluster-JU8KPSDKHM6D/backend-hotdog-brownies-Service-MLGPN09DW4NV
    AWS::ElasticLoadBalancingV2::TargetGroup   arn:aws:elasticloadbalancing:us-east-2:794715269151:targetgroup/backe-Targe-8C97M91MOOHE/83c1821e47cf8960
    AWS::ECS::TaskDefinition                   arn:aws:ecs:us-east-2:794715269151:task-definition/backend-hotdog-brownies:1
    AWS::IAM::Role                             backend-hotdog-brownies-TaskRole-VQ0CI6I048FU

There are things like multiple IAM roles listed randomly, which might be confusing to end users. Also, it might be nice to group the resources in a more intuitive way (eg. Service and Task Definition together, ALB resources together, etc).

SoManyHs commented 4 years ago

Note: this could also be useful in upcoming work with env show @huanjani