docs: provider-generation default_tags + missing YAML function pages#2704
Conversation
…tions
- Add a "Setting Default Tags" section to the Provider Generation page,
showing default_tags via the providers section, tagged with Yor as an
alternative, and populated with !git.repository/!git.sha/!git.branch.
- Add missing YAML function doc pages so they appear in the sidebar:
!git.sha, !git.branch, !git.ref, !git.root, !emulator.
- Cross-link the new git.* pages from their siblings and the functions
index, and fix a pre-existing "{{ .stage }}" template bug (should be
"{{ .vars.stage }}") in the stacks/providers.mdx dynamic example.
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds new Atmos YAML function documentation pages for ChangesYAML function and provider documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@website/docs/components/terraform/providers.mdx`:
- Around line 152-154: The wording in the `default_tags` description is too
broad; update the copy in the Terraform provider docs to say it applies to AWS
resources that support `tags` (with the `aws_autoscaling_group` exception)
rather than “every resource.” Keep the fix localized to the prose around
`default_tags` in the providers docs and preserve the existing explanation about
Atmos generating the provider configuration.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ecc1564a-3cc0-4f97-a4ae-f60b38ba6d42
📒 Files selected for processing (14)
website/docs/components/terraform/providers.mdxwebsite/docs/functions/yaml/emulator.mdxwebsite/docs/functions/yaml/git.branch.mdxwebsite/docs/functions/yaml/git.host.mdxwebsite/docs/functions/yaml/git.name.mdxwebsite/docs/functions/yaml/git.owner.mdxwebsite/docs/functions/yaml/git.ref.mdxwebsite/docs/functions/yaml/git.repository.mdxwebsite/docs/functions/yaml/git.root.mdxwebsite/docs/functions/yaml/git.sha.mdxwebsite/docs/functions/yaml/git.url.mdxwebsite/docs/functions/yaml/index.mdxwebsite/docs/functions/yaml/repo-root.mdxwebsite/docs/stacks/providers.mdx
default_tags only applies to resources supporting Terraform's `tags` argument (aws_autoscaling_group is a notable exception), not literally every resource.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2704 +/- ##
==========================================
- Coverage 81.19% 81.18% -0.01%
==========================================
Files 1630 1630
Lines 154206 154206
==========================================
- Hits 125205 125198 -7
- Misses 22083 22088 +5
- Partials 6918 6920 +2
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
These changes were released in v1.223.0-rc.7. |
what
components/terraform/providers.mdx), showing how to set the AWS provider'sdefault_tagsvia theproviderssection, populated with!git.repository,!git.sha, and!git.branch.!git.sha,!git.branch,!git.ref,!git.root, and!emulator.!git.*pages from their existing siblings (git.name,git.host,git.owner,git.repository,git.url,repo-root) and from the YAML functions index page.stacks/providers.mdx's dynamic provider example:{{ .stage }}is not a valid template variable and should be{{ .vars.stage }}.why
default_tags, a common requirement for consistent resource tagging (repository, commit, branch, etc.) across an account.!git.sha,!git.branch,!git.ref,!git.root, and!emulatorare all implemented, working YAML functions, but had no doc page and were therefore invisible in the sidebar.{{ .stage }}bug produced a non-functional example — Atmos's template context only exposes stage/tenant/environment/namespace nested under.vars, never as bare top-level keys.references
Summary by CodeRabbit
!git.sha,!git.ref,!git.branch,!git.root), repository paths, and emulator connection details (!emulator).default_tagswith dynamic values and a CI-friendly fallback for detachedHEAD.