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

straight-address-35891

10/01/2021, 9:03 AM
👋 Hi everyone! Trying to implement infracost stage in my azure pipeline and this is the error i get. Any pointer on this is appreciated. Thanks!
👋 1
l

little-author-61621

10/01/2021, 9:12 AM
Hi 👋 . Do you have var files that you use for terraform? If so you can pass them with
--terraform-plan-flags="-var-file=vars.tfvars"
For Azure DevOps you can pass this as a
terraform_plan_flags
env var as per https://github.com/infracost/infracost-azure-devops#terraform_plan_flags
s

straight-address-35891

10/01/2021, 9:14 AM
I will check this. Thanks!
I just commented all other stages in my pipeline and included only this infracost stage. But this is the error i am getting now:
Copy code
2021-10-01T09:48:57.7648137Z   Terraform command failed with:
2021-10-01T09:48:57.7655910Z     Error: building account: getting authenticated object ID: Error listing Service Principals: autorest.DetailedError{Original:adal.tokenRefreshError{message:"adal: Refresh request failed. Status Code = '400'. Response body: {\"error\":\"invalid_request\",\"error_description\":\"AADSTS900023: Specified tenant identifier '$(arm_tenant_id)' is neither a valid DNS name, nor a valid external domain.
Trying demo using same files
Please let me know if you need any file info. I can provide the same
w

white-airport-8778

10/01/2021, 10:17 AM
It seems like the arm_tenant_id is not valid, have you set the following env variables according to this TF docs page:? Azure credentials so Terraform init can be run. Usually these are
ARM_CLIENT_ID
,
ARM_CLIENT_SECRET
,
ARM_SUBSCRIPTION_ID
and
ARM_TENANT_ID
.
s

straight-address-35891

10/01/2021, 10:56 AM
Will check this again!
👍 1
w

white-airport-8778

10/05/2021, 11:20 AM
@straight-address-35891 did you manage to get it working?
s

straight-address-35891

10/05/2021, 11:22 AM
Hi Ali, Nope. I had no luck on getting this stage included in our terraform pipeline. Was occupied on other tasks. So, i just parked it aside for time being. Need to get that sorted this week. Thanks for checking anyways!
w

white-airport-8778

10/05/2021, 11:30 AM
cool, I DM’d you in case I can help when you’d like to pick it up again
26 Views