Hi <!channel> I need help to setup bitbucket pipe...
# general
Hi <!channel> I need help to setup bitbucket pipeline any reference will help and one more thing my tf state file is stored in S3 bucket so need reference on that regard. Thanks
read the docs
Hi Please give more detail What kind of issues you faced during pipeline setup?
I have gone through doc
I am not able to find references how we can use when you tfstate file in s3
hi @famous-engineer-27909, please don’t use “channel” as it notifies all the 664 people in this community, and it might be a bit alarming for other members. In regards to your question - what method of integration are you using Infracost with? Plan JSON or HCL parsing?
My bad, Noted @mysterious-teacher-68276
Also, learn how to use punctuation - it helps.
Hey @famous-engineer-27909 Start with something so simple like:
Copy code
infracost breakdown --path .
this will not need
file or S3 backend access.
If everything is working, then, you can read the state file with Terraform plan:
Copy code
cd path/to/code

terraform init
terraform plan -out tfplan.binary
terraform show -json tfplan.binary > plan.json

infracost breakdown --path plan.json
Compare the two options, and see if you really need to use the state file for cost breakdown. 🤷
https://www.infracost.io/docs/integrations is missing Bitbucket, CircleCI, and Jenkins, I’m sure the team will work on this soon. • bitbucket pipeline = infracost pipe • CircleCI = infracost orb • Jenkins = infracost Jenkinsfile
but not that hard to write your own
Thanks @millions-optician-95381 will check, and if i have doubt will let you know
Thanks, @millions-optician-95381. Yes, we actively encourage folks to use HCL parsing by default because this doesn’t require Terraform state or cloud credentials. If, as Mohammed rightly says, you have price inconsistencies or use rely on multiple data blocks and remote state to build resources, then we recommend the Plan JSON approach. This can be built with Terraform, as Mohammed has shown. We also have an example of a bitbucket pipeline using HCL parsing here: https://bitbucket.org/infracost/infracost-bitbucket-pipeline/src/master/
@mysterious-teacher-68276 Thanks for the tips, can we add
pipeline with the upper link to https://www.infracost.io/docs/integrations?
yeah we should probably update that