https://infracost.io logo
#help
Title
# help
b

brief-battery-72669

03/08/2024, 10:41 AM
Hello team, when posting comments to Azure Devops. By default the posted comment is marked as "closed". Can this be marked as "active"? I believe its the updating of a status code.
c

crooked-daybreak-55253

03/08/2024, 2:43 PM
Hi, let me take a look. If you’re familiar with the devops APIs and golang you could submit a pr. The relevant code is here
b

brief-battery-72669

03/08/2024, 5:22 PM
Thank you @crooked-daybreak-55253 - unfortunately I don't have any experience in either. My aim is to enable a policy in AZDO to ensure that the cost changes have been acknowledged before merging the PR. To do this any new comment needs to appear as "active" as opposed to "closed". The current workaround is to install another 3rd party tool post and additional comment after infracost has posted. AFAIK the default state for a post is active.
w

white-airport-8778

03/08/2024, 10:15 PM
@brief-battery-72669 we set the default state to closed to avoid triggering blocking behaviors or cause additional work for engineers. In our experience that works better for cost comments, and from Infracost Cloud you can configure certain checks (such as tagging policies) to block PRs until they’re resolved. Or are you thinking more along the lines of get engineers to acknowledge the PR comments but don’t block them?
b

brief-battery-72669

03/09/2024, 8:20 PM
@little-author-61621 This makes perfect sense. We have a specific requirement that the team of engineers working on a particular project take accountability for the code that they deploy to the many envs. By posting "active" comments as opposed to "closed", the senior Dev merging the code into the main branch will have to acknowledge the cost changes that come with code change. We have this policy applied to main
In our use case the same terraform code gets applied to each env with a seperate TFVARS. Each change made eventually gets deployed across multiple envs. Infracost highlights how each change affects DEV, INT, STA & PRD. I.e creating an new app service plan - ensuring that DEV is on a free or S1 tier where PRD could be on a S3. With the cost comment needing to be resolved, we can use this as a sign off.
w

white-airport-8778

03/11/2024, 10:59 AM
@brief-battery-72669 thanks for the context, that’s helpful. I created this issue so we keep track of it.
b

brief-battery-72669

03/11/2024, 11:51 AM
@white-airport-8778 - Really appreciate your help and consideration! Thanks