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

Fixed billing multiplier for third party AWS accounts #508

Merged
merged 1 commit into from
Jan 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion api/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,9 +2281,16 @@ def _get_sub_account_billing_data( account_id, account_type, start_date, end_dat
"Elastic Compute Cloud",
"EC2"
]

markup_multiplier = 1 + ( int( os.environ.get( "mark_up_percent" ) ) / 100 )

# Markup multiplier
markup_multiplier = 1 + ( int( os.environ.get( "mark_up_percent" ) ) / 100 )
if account_type == "THIRDPARTY":
# For the self-hosted (THIRDPARTY) accounts the multiplier is just 1
# this is because we normally double the AWS pricing and pay half to AWS.
# In the THIRDPARTY situation, the customer pays AWS directly and we just
# take our cut off the top.
markup_multiplier = 1

# Check if this is the first billing month
is_first_account_billing_month = is_organization_first_month(
Expand Down