able-raincoat-53539
11/09/2023, 8:57 AM├── envs
│ └── stage
│ └── project-stage
│ ├── service
│ │ ├── <http://backend.tf|backend.tf>
│ │ ├── <http://main.tf|main.tf>
│ │ ├── <http://providers.tf|providers.tf>
│ │ ├── terraform.tfvars
│ │ ├── <http://variables.tf|variables.tf>
│ │ └── <http://vpc.tf|vpc.tf>
│ ├── postgresql
│ │ ├── <http://backend.tf|backend.tf>
│ │ ├── <http://main.tf|main.tf>
│ │ ├── <http://providers.tf|providers.tf>
│ │ ├── terraform.tfvars
│ │ └── <http://variables.tf|variables.tf>
│ ├── redis
│ │ ├── <http://backend.tf|backend.tf>
│ │ ├── <http://main.tf|main.tf>
│ │ ├── <http://providers.tf|providers.tf>
│ │ ├── terraform.tfvars
│ │ └── <http://variables.tf|variables.tf>
│ └── testing-machine
│ ├── <http://backend.tf|backend.tf>
│ ├── <http://main.tf|main.tf>
│ ├── <http://providers.tf|providers.tf>
│ ├── terraform.tfvars
│ └── <http://variables.tf|variables.tf>
├── modules
├── bucket
│ ├── <http://main.tf|main.tf>
│ └── <http://variables.tf|variables.tf>
├── cloud_sql
│ ├── <http://main.tf|main.tf>
│ ├── <http://outputs.tf|outputs.tf>
│ └── <http://variables.tf|variables.tf>
├── compute_engine
│ ├── <http://main.tf|main.tf>
│ ├── <http://outputs.tf|outputs.tf>
│ └── <http://variables.tf|variables.tf>
├── secrets
│ ├── <http://main.tf|main.tf>
│ └── <http://variables.tf|variables.tf>
└── vpc
├── <http://main.tf|main.tf>
├── <http://outputs.tf|outputs.tf>
└── <http://variables.tf|variables.tf>
little-author-61621
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.@here
on this channel. It will notify 480 people)able-raincoat-53539
11/09/2023, 11:05 AMenvs/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.little-author-61621
able-raincoat-53539
11/09/2023, 1:19 PMlittle-author-61621
able-raincoat-53539
11/09/2023, 5:29 PMinfracost breakdown --path=/tmp/base/envs/stage/project-stage --format=json --out-file=infracost-base.json
This will be executed on the PR branch
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
infracost comment bitbucket --path=infracost.json --repo=$BITBUCKET_WORKSPACE/$BITBUCKET_REPO_SLUG --pull-request=$BITBUCKET_PR_ID --bitbucket-token=$BITBUCKET_TOKEN --behavior=update
little-author-61621