This message was deleted.
# help
b
This message was deleted.
l
@able-raincoat-53539 something like this might work:
Copy code
version: 0.1
projects:
{{- range $project := matchPaths "envs/:env/:stage/:service" }}
  name: {{ $project.env }}-{{ $project.stage }}-{{ $project.service }}
  path: {{ $project._path }}
  terraform_var_files:
    - terraform.tfvars
{{- end }}
Let me know what you think.
(side note: please don’t use
@here
on this channel. It will notify 480 people)
a
Thanks, @little-author-61621 will check. sorry will not use it😅
@little-author-61621 from the above-mentioned structure when I run infracost breakdown & diff on my master branch and PR branch on the service level eg.
envs/stage/project-stage/service
it doesn't show any diff. But if I run it on path
envs/stage/project-stage
it shows proper diff on all services including the
service
, do you have any idea what I am missing. can you help me with this pls.
l
How are you running infracost?
a
In cli
l
What commands are you running?
a
@little-author-61621 This will be executed on base branch
Copy code
infracost breakdown --path=/tmp/base/envs/stage/project-stage --format=json --out-file=infracost-base.json
This will be executed on the PR branch
Copy code
infracost diff --path=/envs/stage/project-stage --compare-to=infracost-base.json --format=json --out-file=infracost.json
Finally to post it to the comment
Copy code
infracost comment bitbucket --path=infracost.json --repo=$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG --pull-request=$BITBUCKET_PR_ID --bitbucket-token=$BITBUCKET_TOKEN --behavior=update
l
@able-raincoat-53539 I’m not seeing anything obvious from that that will be causing it, sorry. When you run the diff are you always using the equivalent path as the breakdown?