big-monkey-25816
10/13/2022, 2:40 PM- name: Post Infracost comment
run: |
infracost comment github \
--github-api-url=<https://redacted/api/v3> \
--path=/tmp/infracost.json \
--repo=$GITHUB_REPOSITORY \
--github-token=${{ secrets.BOTUSER_GH_TOKEN }} \
--pull-request=${{ github.event.number }} \
--behavior=update
I am receiving a 404 error. Does anyone see the same?acceptable-elephant-79273
10/13/2022, 9:04 PMwhite-airport-8778
polite-engineer-31217
10/14/2022, 4:16 AMError: Failed to parse the Terragrunt code using the Terragrunt library:
...
terragrunt.hcl:16,70-73: Invalid index; This value does not have any indices.
This input is subnet_id : dependency.legacy_datasource.outputs.private_subnet_ids[0]
So I was thinking about using
mock_outputs_allowed_terraform_commands = ["validate"]
mock_outputs = {
vpc_id = "fake-vpc-id"
}
but I don’t know what tf_commands should I use since you’re using the parsing library ?
Thank you for your suggestionsglamorous-cat-93012
10/14/2022, 8:57 AMglamorous-cat-93012
10/14/2022, 9:02 AMacceptable-elephant-79273
10/17/2022, 11:28 PMmammoth-painting-38799
10/18/2022, 7:25 AMwhite-airport-8778
$ infracost --version
Infracost v0.10.12
---
$ cat <http://main.tf|main.tf>
provider "aws" {
region = "us-east-1"
skip_credentials_validation = true
skip_requesting_account_id = true
access_key = "mock_access_key"
secret_key = "mock_secret_key"
}
resource "aws_lambda_function" "hello_world" {
function_name = "hello_world"
role = "arn:aws:lambda:us-east-1:account-id:resource-id"
handler = "exports.test"
runtime = "nodejs12.x"
memory_size = 1024
}
---
$ cat infracost-usage.yml
version: 0.1
resource_type_default_usage:
aws_lambda_function:
monthly_requests: 100000 # Monthly requests to the Lambda function.
request_duration_ms: 1000 # Average duration of each request in milliseconds.
---
$ infracost breakdown --path . --usage-file infracost-usage.yml
Name Monthly Qty Unit Monthly Cost
aws_lambda_function.hello_world
├─ Requests 0.1 1M requests $0.02
└─ Duration 100,000 GB-seconds $1.67
OVERALL TOTAL $1.69
fresh-animal-95891
10/25/2022, 12:05 PMsteep-needle-4000
10/25/2022, 5:07 PMmammoth-painting-38799
10/26/2022, 8:15 AMA new key can be obtained by installing the infraost CLI and running infracost auth login the key is usually stored in...yaml
fresh-animal-95891
10/26/2022, 9:44 AMwhite-airport-8778
fresh-refrigerator-73809
10/28/2022, 3:04 PMfresh-refrigerator-73809
10/28/2022, 3:04 PMfresh-refrigerator-73809
10/28/2022, 3:05 PMfresh-refrigerator-73809
10/28/2022, 3:05 PMfresh-refrigerator-73809
10/28/2022, 3:05 PMsh 'curl -O -L <https://infracost.io/downloads/v0.10/infracost-linux-amd64.tar.gz>'
fresh-refrigerator-73809
10/28/2022, 3:06 PMsh 'tar xvzf infracost-linux-amd64.tar.gz'
fresh-refrigerator-73809
10/28/2022, 3:06 PMsh 'infracost --version'
fresh-refrigerator-73809
10/28/2022, 3:06 PMfresh-refrigerator-73809
10/28/2022, 3:07 PMred-animal-2618
10/28/2022, 8:26 PMfresh-refrigerator-73809
10/29/2022, 4:51 AMfresh-refrigerator-73809
10/29/2022, 4:51 AMfresh-refrigerator-73809
10/29/2022, 4:51 AMfresh-refrigerator-73809
10/29/2022, 4:52 AM+ infracost breakdown --path "filepath" --format json --out-file infracost.json
Error: No valid Terraform files found at the given path, try a different directory
fresh-refrigerator-73809
10/29/2022, 4:52 AMfresh-refrigerator-73809
10/29/2022, 4:53 AMsh 'curl -O -L <https://infracost.io/downloads/v0.10/infracost-linux-amd64.tar.gz>'