worried-soccer-67640
09/07/2022, 1:14 PMcrooked-daybreak-55253
09/07/2022, 1:30 PMworried-soccer-67640
09/07/2022, 5:19 PMrepos:
- id: "/.*/"
apply_requirements: [approved, mergeable]
pre_workflow_hooks:
- run: terragrunt-atlantis-config generate --automerge --ignore-dependency-blocks --ignore-parent-terragrunt true --filter aws/accounts/ --autoplan --output atlantis.yaml
- run: yq e -i '.projects[].autoplan.when_modified += "files"' atlantis.yaml
workflow: terragrunt
workflows:
terragrunt:
plan:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: direnv-allow-all
- run: direnv exec . terragrunt plan -input=false -out=$PLANFILE
- run: direnv exec . terragrunt show -json $PLANFILE > $SHOWFILE
apply:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: direnv-allow-all
- run: direnv exec . terragrunt apply -input=false $PLANFILE
this is what it looks like after following the README
repos:
- id: "/.*/"
apply_requirements: [approved, mergeable]
pre_workflow_hooks:
- run: |
/tmp/infracost --version && [ $(/tmp/infracost --version 2>&1 | grep -c "A new version of Infracost is available") = 0 ] || \
curl -L <https://infracost.io/downloads/v0.10/infracost-linux-amd64.tar.gz> --output infracost.tar.gz && \
tar -xvf infracost.tar.gz && \
mv infracost-linux-amd64 /tmp/infracost
- run: terragrunt-atlantis-config generate --automerge --ignore-dependency-blocks --ignore-parent-terragrunt true --filter aws/accounts/ --autoplan --output atlantis.yaml
- run: yq e -i '.projects[].autoplan.when_modified += "files"' atlantis.yaml
workflow: terragrunt
workflows:
terragrunt:
plan:
steps:
- env:
name: INFRACOST_OUTPUT
command: 'echo "/tmp/$BASE_REPO_OWNER-$BASE_REPO_NAME-$PULL_NUM-$WORKSPACE-${REPO_REL_DIR//\//-}-infracost.json"'
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: direnv-allow-all
- run: direnv exec . terragrunt plan -input=false -out=$PLANFILE
- run: direnv exec . terragrunt show -json $PLANFILE > $SHOWFILE
apply:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- run: direnv-allow-all
- run: direnv exec . terragrunt apply -input=false $PLANFILE
is that all i need to do ? 😒hocked_face_with_exploding_head:Also change references to the Infracost CLI invocation to /tmp/infracost
crooked-daybreak-55253
09/07/2022, 5:39 PM# Add custom steps here from the examples mentioned elsewhere in this readme
is trying to say). So if you need to pick how you want comments the comments to be handle (so an option from this table which points you to something in the examples dir).
Assuming you have atlantis > 0.18.2 and you want to use the recommended option, you would go here to see how you would further modify your repos.yaml to run the infracost CLI to generate estimates and push them up to the comment.i don’t understand the below section of the README
When you’re copy the steps from the example you need to useAlso change references to the Infracost CLI invocation to /tmp/infracost
/tmp/infracost
to invoke the CLI wherever the example calls infracost
. So instead of infracost comment github …
you would write /tmp/infracost comment github …
worried-soccer-67640
09/07/2022, 5:43 PMcrooked-daybreak-55253
09/07/2022, 5:45 PMworried-soccer-67640
09/07/2022, 5:45 PMcrooked-daybreak-55253
09/07/2022, 5:46 PMINFRACOST_PRICING_API_ENDPOINT
env which tells the CLI to talk to your self hosted pricing apiworried-soccer-67640
09/07/2022, 5:47 PMINFRACOST_PRICING_API_ENDPOINT
- env:
name: INFRACOST_ENABLE_CLOUD
value: true
i can have
- env:
name: INFRACOST_PRICING_API_ENDPOINT
value: <http://mycustomendpoint.net>
crooked-daybreak-55253
09/07/2022, 5:54 PMworried-soccer-67640
09/07/2022, 5:54 PMcrooked-daybreak-55253
09/07/2022, 5:56 PMworried-soccer-67640
09/07/2022, 5:56 PMinfracost configure get api_key
to get an api_key which my self hosted install needs to download the pricing data from the api. however, i don't know how i should pass this to the self hosted install that i'm deploying via the chart.
i can see there is a value for infracostAPIKey
but it's a string value and i don't really want it in plaintext on github.
i can see this value api.existingSecretSelfHostedAPIKey
but i'm not sure if that's something else?api.selfHostedInfracostAPIKey
be called api.selfHostedCloudPricingAPIKey
crooked-daybreak-55253
09/07/2022, 9:53 PMinfracost auth login
.infracost auth login
) API key.worried-soccer-67640
09/07/2022, 11:07 PMinfracost auth login
)to the self hosted API, via a k8s secret and not a string?crooked-daybreak-55253
09/08/2022, 1:23 AMSELF_HOSTED_INFRACOST_API_KEY
is the api key that CLIs should be using to connect. That can be set by either selfHostedInfracostAPIKey
as a string, or if you want to use a secret with existingSecretSelfHostedAPIKey
or, per the readme, “If left empty, the helm chat will generate one for you.“.
infracostAPIKey
is used to download the pricing data, it don’t see a way to provide that as a secret.
I’m not 100% certain on the postgres password, @little-author-61621 may have an idea.little-author-61621
09/08/2022, 6:55 AMi have created a secret with my desired postgresql password.
does the key of that password value in the secret need to be set to something specific?It should be
postgresql-password
(link to helm chart section)worried-soccer-67640
09/08/2022, 9:28 AMinfracostAPIKey
as a k8s secret?existingSecretAPIKey
?little-author-61621
09/08/2022, 9:48 AMexistingSecretAPIKey
valueinfracost-api-key
in it, it should workworried-soccer-67640
09/08/2022, 9:49 AM