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

feat(cli): Add 'all' option for fields argument #916

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

kevinkengne
Copy link
Contributor

Fixes #876

Addall for the --fields argument, which causes the output to contain all the supported fileds: price, monthlyQuantity, unit, hourlyCost, monthlyCost.

CLI command executed

make run ARGS="breakdown --path examples/terraform --usage-file=examples/terraform/infracost-usage.yml --fields=all: 

Output returned


 Name                                                           Price  Monthly Qty  Unit         Hourly Cost  Monthly Cost 
                                                                                                                           
 aws_instance.web_app                                                                                                      
 ├─ Instance usage (Linux/UNIX, on-demand, m5.4xlarge)          $0.77          730  hours              $0.77       $560.64 
 ├─ root_block_device                                                                                                      
 │  └─ Storage (general purpose SSD, gp2)                       $0.10           50  GB                 $0.01         $5.00 
 └─ ebs_block_device[0]                                                                                                    
    ├─ Storage (provisioned IOPS SSD, io1)                      $0.13        1,000  GB                 $0.17       $125.00 
    └─ Provisioned IOPS                                        $0.065          800  IOPS               $0.07        $52.00 
                                                                                                                           
 aws_lambda_function.hello_world                                                                                           
 ├─ Requests                                                    $0.20          100  1M requests        $0.03        $20.00 
 └─ Duration                                            $0.0000166667   25,000,000  GB-seconds         $0.57       $416.67 
                                                                                                                           
 OVERALL TOTAL                                                                                                   $1,179.31

@tim775 tim775 self-requested a review August 19, 2021 20:26
Copy link
Member

@tim775 tim775 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, thank you!

@tim775 tim775 merged commit a90cd3b into infracost:master Aug 20, 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

Successfully merging this pull request may close these issues.

Proposal: Adding an option which cause the output to contain all the fields
3 participants