-
-
Notifications
You must be signed in to change notification settings - Fork 250
feat(origin_groups): added support for custom group_id #344
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe changes introduce an optional Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes were found. ✨ 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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
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: 0
🧹 Nitpick comments (2)
variables.tf (2)
656-656
: Add validation forgroup_id
.
The optionalgroup_id
attribute should be validated to ensure it is non-empty, matches allowed characters for CloudFront origin IDs, and is unique across all origin groups.
662-669
: Document the newgroup_id
attribute.
The variable description fororigin_groups
does not mention the newgroup_id
option. Update the documentation to explain its purpose and how it is used in theorigin_group
block.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
README.md
is excluded by!README.md
📒 Files selected for processing (4)
README.yaml
(1 hunks)examples/complete/main.tf
(1 hunks)main.tf
(1 hunks)variables.tf
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`examples/complete/*.tf`: This is framework for testing and standards are very relaxed, plus certain things need to be certain ways for testing. Exclude from review unless you find...
examples/complete/*.tf
: This is framework for testing and standards are very relaxed, plus certain things need to be certain ways for testing. Exclude from review unless you find misspelling or similar error in comments or serious errors in code.
examples/complete/main.tf
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (3)
main.tf (1)
492-492
: Conditionalorigin_id
fallback is correct.
The use oftry(length(origin_group.value.group_id), 0) > 0
cleanly handles missing or emptygroup_id
values and falls back to the autogenerated naming.README.yaml (1)
134-134
: Skip: Illustration only.
The addition ofgroup_id = "groupS3"
in the README example aligns with the module enhancement and requires no further action.examples/complete/main.tf (1)
121-121
: Skip: Example demonstration.
The example usage correctly demonstrates the newgroup_id
attribute in theorigin_groups
block.
4c60c05
to
a30caa1
Compare
a30caa1
to
91b675a
Compare
what
Added support for optional
group_id
inorigin_groups
object, which can be referenced inordered_cache
block.why
The module code does not allow setting up custom id for origin group.
Instead, the module names groups in this format:
$name-group[$id]
This is not ideal, as when specifying
target_origin_id
inordered_cache
config, we have to reference it by an arbitrary group id, based on its order of appearance in config, instead of actual name and purpose.references
closes #339