<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: cloudcosttree</title>
    <description>The latest articles on DEV Community by cloudcosttree (@cloudcosttree).</description>
    <link>https://dev.to/cloudcosttree</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4069909%2F3800f17e-1701-4119-bc05-040d90476013.png</url>
      <title>DEV Community: cloudcosttree</title>
      <link>https://dev.to/cloudcosttree</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cloudcosttree"/>
    <language>en</language>
    <item>
      <title>Why most Terraform cost estimators guess at Auto Scaling Groups (and why that's a problem)</title>
      <dc:creator>cloudcosttree</dc:creator>
      <pubDate>Thu, 13 Aug 2026 14:49:34 +0000</pubDate>
      <link>https://dev.to/cloudcosttree/why-most-terraform-cost-estimators-guess-at-auto-scaling-groups-and-why-thats-a-problem-39pe</link>
      <guid>https://dev.to/cloudcosttree/why-most-terraform-cost-estimators-guess-at-auto-scaling-groups-and-why-thats-a-problem-39pe</guid>
      <description>&lt;p&gt;If your Auto Scaling Group uses &lt;code&gt;mixed_instances_policy&lt;/code&gt;, no cost tool reading your Terraform can tell you what instance type it's actually running. Not because the tool is bad. Because the information genuinely isn't in your config.&lt;/p&gt;

&lt;p&gt;You declare a launch template with a few weighted overrides, say m5.large, m5a.large, and m5n.large, and AWS decides at launch time which one actually gets used based on capacity and price. Your &lt;code&gt;.tf&lt;/code&gt; file never says which one wins. It can't, the answer depends on what AWS has available right now, not on anything you declared.&lt;/p&gt;

&lt;p&gt;So what do most cost estimators do with this? Usually one of two things: pick the first override and price the whole group as if every instance were that type, or silently show it as free because nothing matched a known shape. Both are wrong in a way that looks right. You get a clean dollar number with no indication that it's a guess.&lt;/p&gt;

&lt;p&gt;I built CloudCostTree, and when I hit this case the honest answer was to not show a number at all. A group using &lt;code&gt;mixed_instances_policy&lt;/code&gt; renders as unpriced by default, because there's no way to know which override actually got used without asking AWS directly. If you opt into &lt;code&gt;--with-usage&lt;/code&gt;, it calls AWS's own API, looks at what's actually running right now, and prices the group as its most common real instance type. Without that, it stays unpriced rather than confidently wrong.&lt;/p&gt;

&lt;p&gt;This isn't a one-off. It's the same call in a few other places: a Bedrock model pointing at a custom or fine-tuned version doesn't get resolved and priced, because that resolution isn't something a static config can answer. A multi-variant SageMaker endpoint gets priced against its first declared variant only, since there's no way to know real traffic split from the config alone, and that's disclosed, not hidden.&lt;/p&gt;

&lt;p&gt;The pattern I keep coming back to is: if a value can't be confirmed, it's better to say so than to fabricate something plausible. A wrong number that looks confident is worse than a visible gap, because the wrong number gets trusted and the gap gets investigated.&lt;/p&gt;

&lt;p&gt;If you're curious what this looks like end to end, I wrote CloudCostTree around this idea, a CLI that reads Terraform, CloudFormation, or Pulumi and prices your infrastructure before you apply it: &lt;a href="https://cloudcosttree.com" rel="noopener noreferrer"&gt;https://cloudcosttree.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to talk through edge cases if anyone's hit something similar.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>terraform</category>
      <category>aws</category>
    </item>
  </channel>
</rss>
