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

eager-advantage-28287

10/06/2022, 4:02 PM
Hi team, How do we integrate self-hosted setup with Github Actions? I am not able to find the exact variable to pass the self hosted domain details for Infracost?
c

crooked-daybreak-55253

10/06/2022, 4:05 PM
Hi, You can set
INFRACOST_PRICING_API_ENDPOINT
to point to your self hosted cloud pricing API. In the docs here.
e

eager-advantage-28287

10/06/2022, 4:19 PM
Understood and I am able to pass it on CLI but unable to find it how to pass on the github action workflow yaml file
c

crooked-daybreak-55253

10/06/2022, 4:20 PM
any chance you can share the workflow yaml?
e

eager-advantage-28287

10/06/2022, 4:21 PM
sure, i am planning to the one mentioned in the documents only -> https://github.com/infracost/actions
c

crooked-daybreak-55253

10/06/2022, 4:24 PM
you can set it in the
env:
section at the top where
TF_ROOT
is being set. So:
Copy code
...
env:
      TF_ROOT: examples/terraform-project/code
      INFRACOST_PRICING_API_ENDPOINT: <https://yourendpoint>
...
e

eager-advantage-28287

10/06/2022, 4:25 PM
ohhh..awesome! Will try and let you know how it went. Thanks for the quick help