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(aws): Refactored CPU credits to use usage file. #617

Merged
merged 7 commits into from
May 1, 2021

Conversation

robh007
Copy link
Contributor

@robh007 robh007 commented Apr 28, 2021

fixes #554

Allows usage data to be provided for the following resources.

aws_autoscaling_group both aws_launch_configurations & aws_launch_templates
aws_eks_node_group
aws_instance

The following values can now be added to your usage file, to estimate EC2 CPU credit usage over a given month.

cpu_credit_hrs: 350 # Number of hours in the month where you expect to burst the instance
virtual_cpu_count: 2 # Number of vCPUs that the instance type as.

@alikhajeh1 alikhajeh1 self-assigned this Apr 28, 2021
infracost-usage-example.yml Show resolved Hide resolved
Comment on lines 53 to 55
# Only used when T2 credit_specification is set to unlimited or T3 & T4 instance types are used within a launch template, or T3 & T4 instance types in a launch configuration.
cpu_credit_hrs: 350 # Number of hours in the month where you expect to burst the instance
virtual_cpu_count: 2 # Number of vCPUs that the instance type as.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Only used when T2 credit_specification is set to unlimited or T3 & T4 instance types are used within a launch template, or T3 & T4 instance types in a launch configuration.
cpu_credit_hrs: 350 # Number of hours in the month where you expect to burst the instance
virtual_cpu_count: 2 # Number of vCPUs that the instance type as.
# Only applicable when T2 credit_specification is set to unlimited, or T3 & T4 instance types are used within a launch template, or T3 & T4 instance types are used in a launch configuration.
monthly_cpu_credit_hrs: 350 # Number of hours in the month where the instance is expected to burst.
virtual_cpu_count: 2 # Number of the vCPUs for the instance type.

infracost-usage-example.yml Outdated Show resolved Hide resolved
@alikhajeh1 alikhajeh1 assigned robh007 and unassigned alikhajeh1 Apr 29, 2021
@alikhajeh1
Copy link
Member

Thanks @robh007! Added my comments, mainly trying to cleanup old inconsistencies 😅

@robh007
Copy link
Contributor Author

robh007 commented Apr 30, 2021

@alikhajeh1 I've updated as requested.

@alikhajeh1 alikhajeh1 merged commit 89c9256 into infracost:master May 1, 2021
@alikhajeh1
Copy link
Member

Thanks @robh007!

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.

AWS burstable instance credits calculations.
2 participants