cuddly-dentist-1090
07/03/2024, 9:31 PMversion: 0.1
env:
AWS_ACCESS_KEY_ID: ${IC_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${IC_SECRET_ACCESS_KEY}
Where the IC_ variables are ones that I added to our GitLab repository as CI/CD variables. I have verified that this key/secret has the required IAM permissions by downloading a module from the aws-cli using these credentials.
However, I'm still getting 403 responses while Infracost is trying to fetch the modules. Not really sure what the next step in troubleshooting should be. Anyone with suggestions on what to try next?white-airport-8778
AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx infracost breakdown --path . ---log-level=debug
locally on your laptop, does it download modules ok?
If you can’t run that locally, try setting the 2 AWS envs as gitlab env vars to see if that makes a differencecuddly-dentist-1090
07/04/2024, 3:47 PMwhite-airport-8778
cuddly-dentist-1090
07/04/2024, 4:06 PMwhite-airport-8778
AWS_ACCESS_KEY_ID=$MYENV AWS_SECRET_ACCESS_KEY=$MYOTHERENV infracost breakdown --path . ---log-level=debug
in gitlab-ci.yml does that work?cuddly-dentist-1090
07/04/2024, 4:26 PMinfracost:
image: infracost/infracost:ci-latest
variables:
AWS_ACCESS_KEY_ID: ${IC_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${IC_SECRET_ACCESS_KEY}
script:
- infracost breakdown --path .
allow_failure: true
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
But it gives me this error:
Using docker image sha256:f64b2699a12d7cac004dd13d3a2c4903c3bfcf8b9ccdd6fa4aa132a167f338fc for infracost/infracost:ci-latest with digest infracost/infracost@sha256:e0ee23510c4d175bf17d05f784aa53ebdedc8f4f190e99c034251e9bfc8e7fdf ...
Error: unknown command "sh" for "infracost"
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
white-airport-8778
white-airport-8778
cuddly-dentist-1090
07/04/2024, 4:38 PMwhite-airport-8778