Update terraform-policy skill for tfpolicy 0.1.x and 0.2.0+ compatibility - #97
Merged
Merged
Conversation
|
|
||
| ### Core Structure | ||
| ```hcl | ||
| policy { |
Member
There was a problem hiding this comment.
@vpaul97 - instead of hardcoding the provider version you should write the reasoning for it and give the AWS one here as an example
Contributor
Author
There was a problem hiding this comment.
Put the reasoning in the 'Block' section above and wrote further reasoning with the aws example 👍 Let me know if this works better!
…and example - Add comments explaining why version constraints matter - Change from hardcoded 6.0.0 to broader 5.0.0 range as example - Add guidance to adjust based on infrastructure - Note that other providers can be added Addresses reviewer feedback on PR hashicorp#97
leefowlercu
approved these changes
Aug 26, 2026
leefowlercu
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me! Thanks for the update V!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
policy.required_providersusage for.policy.hclwhen usingtfpolicy0.2.0+tfpolicy testschema-verification caveat observed withtfpolicy0.2.0tfpolicy0.1.xand0.2.0+Changes
plugins/terraform/skills/terraform-policy/SKILL.mdplugins/terraform/skills/terraform-policy/README.mdplugins/terraform/skills/terraform-policy/references/tfpolicy-author.mdplugins/terraform/skills/terraform-policy/references/tfpolicy-test.mdplugins/terraform/skills/terraform-policy/references/verified-syntax.mdNotes
tfpolicy0.1.xdoes not requirepolicy { required_providers { ... } }tfpolicy0.2.0+requires top-levelpolicy { required_providers { ... } }for.policy.hclvalidationresource_policy "*"are not schema-validatedtfpolicy testmay warn that resource types were not verified against provider schemas even whentfpolicy validatesucceeds separatelyValidation