Replies: 2 comments 5 replies
-
@mloskot great question! We're following a similar strategy to versioning as Terraform's CLI, so Infracost v0.9.0 to v0.10.0 had breaking changes that required you to migrate, but v0.10.1 to v0.10.2 had no breaking changes. We release a new CLI version every 2-4 weeks. The issue with The issue with downloading the CLI binary directly from GitHub is that you lock to an old version and don't get the latest mappings and bug fixes in patch releases. Unfortunately GitHub doesn't support SemVer range downloads. So the main benefit of We also wrote an endpoint that returns the latest v0.10 version so you can do this if you can't/don't want to use that task: We use to have another Azure Pipeline task to post the PR comment but we removed it and moved that logic into |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm hosting my IaC in GitHub repository and running Terraform with Azure Pipelines.
I'm following the Getting Started > Add to CI/CD > Azure Pipelines where the first step says
I followed that instruction, but I'm not my Azure Pipelines admin so I have to wait...
Meanwhile, I'm trying my pipeline to run Infracost for Terraform plan in JSON which failed for obvious reasons
While I'm waiting for my Azure Pipelines admin, I continue with learning more about Infracost and the Infracost Tasks documentation explains a few details:
InfracostSetup
basically installs theinfracost
executableenableDashboard
which can be used to disable sending anything to dashboardI also look around my organization at dashboard.infracost.io and there is this message in the Organization settings > Plan and billing section:
so, it seems that I can continue running
infracost
in CLI withenableDashboard=false
and there will be no requirement of further communication betweeninfracost
and dashboard.infracost.io.Other Infracost examples of setting it up for other CI/CD like GitLab or Jenkins, I see they do not use any bespoke solution like Infracost Tasks for Azure Pipelines, but container image
image: infracost/infracost:ci-0.10
.Long story short, the setup for Azure Pipelines can also be simplified to the official manual installation:
Now, let's assume that:
then, why would I want to do this in my Azure Pipelines YAML files
instead of just grabbing the
infracost-linux-amd64.tar.gz
, exporting theINFRACOST_API_KEY
environment variable and runninginfracost
CLI commands?Is my understanding correct, that the only benefit of using the
InfracostSetup@v1
task is the convenience controlling Infracost with Azure Pipelines task inputs likeenableDashboard
,apiKey
, etc.?If that is correct, then to be honest, it would be very beneficial to explain that in the documentation. (It could potentially save devops folks lots of time waiting for their Azure Pipelines admins to accept the Infracost Tasks addition ;-))
Finally, what could those other benefits of using the Azure Pipeline's Infracost Task be?
For example, instead of requiring the GitHub PAT for posting GitHub PR comment, the task could use named Azure Pipelines to GitHub connection (OAuth), like Microsoft's GitHubComment task do. I could not find anything on that in the Infracost documentation, so I guess it is not supported.
Beta Was this translation helpful? Give feedback.
All reactions