https://infracost.io logo
#general
Title
# general
c

curved-animal-37854

02/08/2023, 12:38 PM
We are working on adding ARM support to Infracost. Using the ARM What-If API we just succeeded in getting an estimate for an Azure ASP + Web App. Next step is calling infracost breakdown with the actual IaC template rather than the What-If result. Many thanks to @prehistoric-article-73489 who did the bulk of the implementation work!
w

white-airport-8778

02/08/2023, 3:33 PM
Hey Tiamo - that looks cool! I just read through this tutorial to understand ARM what-if better. Would I be right in saying that
az deployment group what-if
is similar to
terraform plan
- so it gives you a diff of resources, and by you passing that into
infracost breakdown
you kinda get a diff of what is about to be added?
p

prehistoric-article-73489

02/08/2023, 3:35 PM
That's exactly right Ali! It returns a snapshot of the resource properties before and after the submitted change, and also lists the direct property changes. We're still early on with getting all the test infrastructure in place, but it looks pretty promising so far 🙂
w

white-airport-8778

02/08/2023, 3:35 PM
Very nice - thanks for sharing your knowledge and early work with the community!
p

prehistoric-article-73489

02/09/2023, 4:11 PM
Hey @white-airport-8778, to get a
whatif
from an arm template we need some additional info from the user (deployment scope, resource group name, location etc.) what would be the place to do that? Seems this could be in
Project
or
Config
. Both are pretty terraform specific so this would be a tack-on or separate objects for the azurerm provider. I'm leaning towards a separate
Project
for azurerm related providers. But that might be a lot of work. Thoughts?
w

white-airport-8778

02/09/2023, 4:24 PM
@prehistoric-article-73489 ignoring infracost for a second, how do users input those things to ARM just now? Do they pass those in via files or flags or envs or all 3?
p

prehistoric-article-73489

02/09/2023, 4:25 PM
Flags to the az cli mostly, az also has different commands based on the scope (resource group, subscription etc.). Example: https://learn.microsoft.com/en-us/cli/azure/deployment/sub?view=azure-cli-latest#az-deployment-sub-what-if
w

white-airport-8778

02/09/2023, 4:27 PM
ok if I move this chat to #contributors ? I’ll add some thoughts there and tag you in a min
6 Views