hi, I would like some help clarifying the definiti...
# general
r
hi, I would like some help clarifying the definition of a “Pulumi Credit”, and how it is calculated. To set some context, I am assuming (let me know if I’m wrong) that the number of “hours” / length of time will be taken from the “Duration: ” output at the end of a
pulumi up
command. Also, assume that I just have one resource for the moment for simplicity’s sake. 1. besides
pulumi up
, are there any other operations that would draw down on the number of credits I have? 2. if I run
pulumi up
twice, and the first duration is 3s, and then second is 10s, does that equate to 1 hour at the end of the month (3s + 10s = 13s, which in total is a “partial hour”)… or 2 hours, with each of 3s and 10s counting as individual separate “partial hours”? https://www.pulumi.com/pricing/ says
Each partial hour used is billed as a full hour.
, but the definition of a “partial hour” could be clarified
p
I’ve seen there’s much confusion about the pricing model used by Pulumi. AFAIK (disclaimer: I’m not a Pulumi employee), you pay for “the state storage over time”. If you create a stack that consists of 5 resources and let it be live for 10 hours, you’re gonna pay 5*10 = 50 credits. Running any pulumi commands (including
pulumi up
) does not affect the billing. Duration of
pulumi up
doesn’t matter either.
Quoting the pricing FAQ:
A Pulumi Credit is the price for managing one resource for one hour. If using the Team Edition, each credit costs $0.00025. For billing purposes, we count any resource that’s declared in a Pulumi program. This includes provider resources (e.g., an Amazon S3 bucket), component resources which are groupings of resources (e.g., an Amazon EKS cluster), and stacks which contain resources (e.g., dev, test, prod stacks).
You consume one Pulumi Credit to manage each resource for an hour. For example, one stack containing one S3 bucket and one EC2 instance is three resources that are counted in your bill.
and:
150,000 credits represent approximately 200 resources managed for a month. So, for example, you could manage 200 S3 buckets or 200 EC2 instances for a month using this amount.
Copy code
200 resources * 24h a day * 30 days in a month = 144 000 credits ~ 150k credits
See the FAQ section “Credits and Pricing” at: https://www.pulumi.com/pricing/
r
gotcha. Thank you. That makes sense
I still have a question about the definition of “partial hour”, though, but in this case related to management time. I will add that as a 3rd question
p
If I understand it correctly, that refers to billing model that’s “per-hour” (compared to e.g. GCP that works on “per-second” biling model). In other words, if your resource lives for 5 minutes, that’s gonna be rounded up to 1h.
r
right. My question would be in terms of how all of these “sub-hour” times are calculated. Are they all added up, before rounding up the last part thereof to 1 hour? or does each “sub-hour” count as 1 hour each? So let’s say I manage one resource for 5 min, and then remove it. That’s a partial hour. And then I create another resource, and have the state be managed for 20 min before deleting it. Would the 2 sub-hour times be added together at the end of the month, and then rounded up to 1 hour? or does each sub-hour get rounded up independently?
p
Hah, got it. That’s a good question.
To be totally honest, I didn’t think about that much. Most of the infrastructure I manage is not ephemeral in a sense that it exists for quite a long time once it’s deployed. That’s why I don’t really care about such details but I can understand it can matter a lot if you happen to manage a lot of infrastructure that’s being destroyed after some short time (like 20 min).
r
yeah I can understand that. I dont imagine that this scenario will happen a lot.. but if we’re doing experiments, or trying things out, it might. Regardless, I’m interested in the details 🙂
b
@rhythmic-branch-12845 Jakub has done a wonderful job (thanks!) of explaining, but I think if you need more information, a quick chat with an AE will really help. I can set that up for you if needed
r
Yes, please. I'm assuming an AE is some staff with Pulumi.
b
yes! I am staff, but on the technical side. I work closely with the account executives. An account executive will help you understand the pricing and options and help you navigate that side of things. Could you email me: lbriggs@pulumi.com and I'll set it up!
r
done. Thank you!