Title
#general
n

Nikhil

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?
Tim (Infracost)

Tim (Infracost)

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.
n

Nikhil

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
Tim (Infracost)

Tim (Infracost)

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

Nikhil

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

Tim (Infracost)

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

Nikhil

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