-
-
Notifications
You must be signed in to change notification settings - Fork 0
Missing Deployment Branch Policy Inputs #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughExtended the environments configuration in src/main.tf by adding reviewers and deployment_branch_policy fields within the locals block. No changes to public interfaces or exported declarations. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/main.tf (2)
91-95: Make fields resilient when not provided (optional)If existing callers omit reviewers or deployment_branch_policy, direct attribute access may error. Consider defaulting with try(..., null) so these remain optional.
- reviewers = v.reviewers - deployment_branch_policy = v.deployment_branch_policy + reviewers = try(v.reviewers, null) + deployment_branch_policy = try(v.deployment_branch_policy, null)
91-95: Environments schema is correct; documentation needs updatesI confirmed that in src/variables.tf, the
environmentsvariable’stype = map(object({…}))block already defines both
reviewers = object({ teams = list(string), users = list(string) })deployment_branch_policy = object({ protected_branches = bool, custom_branches = optional(list(string)) })and includes validation for each field, so no schema changes are required.
However, I didn’t find any mention of
environmentsin README.md or an examples/ directory. Please:
- Update README.md (under “Variables” or “Inputs”) to document the
environmentsblock and all nested attributes:
•wait_timer,can_admins_bypass,prevent_self_review
•reviewers.teams,reviewers.users
•deployment_branch_policy.protected_branches,deployment_branch_policy.custom_branches
• any other nested maps (variables,secrets, etc.)- Add or update example usage (e.g. in an examples/ folder or code snippet in the README) showing how to configure these new attributes.
This will ensure users don’t hit plan-time errors and have accurate documentation.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
src/main.tf(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Summary
🔇 Additional comments (1)
src/main.tf (1)
91-95: LGTM: Passing through reviewers and deployment_branch_policy to environmentsThis fills the gap in the locals map so the module receives the full environment config. Good catch.
|
/terratest |
|
/terratest |
|
These changes were released in v0.2.2. |
what
why
references
.
Summary by CodeRabbit