This message was deleted.
# general
b
This message was deleted.
👋 1
l
Hmm, so that looks like an issue with it running the
terragrunt
binary. Does adding a step that runs
terragrunt run-all terragrunt-info
directly fail with the same issue?
a
Yes indeed this is a permission issue because we use a github action to run our Terragrunt script and it is executed as root, when we run the infracost action, it is run as
runner
which does not have the right to write in
terragrunt-cache
which were created previously
m
@adventurous-spring-45692 does this mean you’ve been able to fix it or are you still looking for help? Are you able to alter the terragrunt script to change the perms of the generated files/dir to be writeable by the
runner
user?
a
I was able to fix it in a dirty way by doing a:
Copy code
- name: Run Infracost
      run: |
        sudo chown -R 1001:1001 ${{ env.tf_working_dir }}
        infracost breakdown --path=${{ env.tf_working_dir }} --format=json --out-file=/tmp/infracost.json
Before running it
I'm using https://github.com/particuleio/terragrunt-github-actions which is a Docker based action than run my Terragrunt init/validate/apply/plan and post the comment, and runs as
root
inside the container. I haven´t found another workaround as github action documentation say to not use USER in Dockerfile to create github actions
👍 1