Hi all, in our organisation we have quite a few large Terraform repos governing various resources in AWS. As a result, it’s often difficult to find the source code that manages a particular resource. In a perfect world, we would like to tag each resource with its source control url, down to the file level. That way anyone would be able to easily find the file they need to change when they need to modify a Terraform-governed resource. Would that be possible to automate with Terraform?
I don’t understand exactly, but Selecting a revision
can help you ?
Thanks for your response, but that’s not what I’m after. Imagine you’re in a large organisation, looking at a Terraform managed resource in AWS management console (or Azure equivalent). How can you tell where the .tf source for that resource lives? Usually you have to ask around or maybe search all your repos hoping some part of the name matches. In a perfect world, each particular resource would be tagged with a link to its source, so you can navigate to it directly. Does that make sense?
We do something similar. We have a tag applied as a default tag (in the provider config settings in each repo) which gives a link the the GitHub repo the code is in.