-
-
Notifications
You must be signed in to change notification settings - Fork 253
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 (beta)
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. Comment |
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_idattribute 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_idattribute.
The variable description fororigin_groupsdoes not mention the newgroup_idoption. Update the documentation to explain its purpose and how it is used in theorigin_groupblock.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
README.mdis 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_idfallback is correct.
The use oftry(length(origin_group.value.group_id), 0) > 0cleanly handles missing or emptygroup_idvalues 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_idattribute in theorigin_groupsblock.
4c60c05 to
a30caa1
Compare
a30caa1 to
91b675a
Compare
|
Any chance of getting this merged? |
what
Added support for optional
group_idinorigin_groupsobject, which can be referenced inordered_cacheblock.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_idinordered_cacheconfig, 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