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

Shorten plan output #1413

Closed
joerg opened this issue Feb 16, 2021 · 2 comments
Closed

Shorten plan output #1413

joerg opened this issue Feb 16, 2021 · 2 comments

Comments

@joerg
Copy link
Contributor

joerg commented Feb 16, 2021

Once terraform plans get bigger a plan output will be mostly filled with "Refreshing state..." lines. Even small projects that use a few modules quickly have hundreds of those lines, which means that atlantis comments in Github/Bitbucket/Gitlab will be very long and eventually split for potentially very little real information on what is being changed.
It would be nice to have an option that hides those "Refreshing state..." lines easily. Using wrappers and grep of course is an option but not a very nice one in my opinion.
So a comment like this:

aws_route.acme_inc_production_tgw_public_vpc_routes[3]: Refreshing state... [id=r-rtb-aaaaaaaaaaaaaaaaaaaaaaaaaaa]
aws_route.acme_inc_production_tgw_public_vpc_routes[0]: Refreshing state... [id=r-rtb-aaaaaaaaaaaaaaaaaaaaaaaaaaa]
aws_route.acme_inc_production_tgw_public_vpc_routes[1]: Refreshing state... [id=r-rtb-aaaaaaaaaaaaaaaaaaaaaaaaaaa]
aws_route.acme_inc_production_tgw_public_vpc_routes[2]: Refreshing state... [id=r-rtb-aaaaaaaaaaaaaaaaaaaaaaaaaaa]
... <possibly hundreds more here>...
module.acme_inc_sandbox.aws_iam_role_policy_attachment.sso_billing_attachment: Refreshing state... [id=BillingAccess-20210129144109122700000003]
module.acme_inc_sandbox.aws_iam_role_policy_attachment.sso_viewonly_attachment: Refreshing state... [id=ViewOnlyAccess-20210129144109155900000005]
module.acme_inc_sandbox.aws_iam_role_policy_attachment.sso_administrator_attachment: Refreshing state... [id=AdministratorAccess-20210129144109115100000002]

An execution plan has been generated and is shown below.                                                                                                                                                           
Resource actions are indicated with the following symbols:                                                                                                                                                         
  - destroy  
  
Terraform will perform the following actions:                                                            

  # null_resource.dummy will be destroyed                                                                
  - resource "null_resource" "dummy" {
    - id = "1056314616063222887" -> null                                                               
    }                                                                                                                                                                                                             
    
Plan: 0 to add, 0 to change, 1 to destroy.  

should become this:

An execution plan has been generated and is shown below.                                                                                                                                                           
Resource actions are indicated with the following symbols:                                                                                                                                                         
  - destroy  
  
Terraform will perform the following actions:                                                            

  # null_resource.dummy will be destroyed                                                                
  - resource "null_resource" "dummy" {
    - id = "1056314616063222887" -> null                                                               
    }                                                                                                                                                                                                             
    
Plan: 0 to add, 0 to change, 1 to destroy.  
@mwarkentin
Copy link
Contributor

Dupe of #1306?

@joerg
Copy link
Contributor Author

joerg commented Feb 16, 2021

Yes, it seems so. Sorry, I missed that one when searching for similar issues.

@joerg joerg closed this as completed Feb 16, 2021
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

2 participants