Skip to content

docs: provider-generation default_tags + missing YAML function pages#2704

Merged
Andriy Knysh (aknysh) merged 3 commits into
mainfrom
osterman/audit-missing-docs
Jul 9, 2026
Merged

docs: provider-generation default_tags + missing YAML function pages#2704
Andriy Knysh (aknysh) merged 3 commits into
mainfrom
osterman/audit-missing-docs

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jul 8, 2026

Copy link
Copy Markdown
Member

what

  • Add a "Setting Default Tags" section to the Provider Generation page (components/terraform/providers.mdx), showing how to set the AWS provider's default_tags via the providers section, populated with !git.repository, !git.sha, and !git.branch.
  • Add 5 missing YAML function doc pages so they appear in the docs sidebar: !git.sha, !git.branch, !git.ref, !git.root, and !emulator.
  • Cross-link the new !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.
  • Fix a pre-existing template bug in stacks/providers.mdx's dynamic provider example: {{ .stage }} is not a valid template variable and should be {{ .vars.stage }}.

why

  • The Provider Generation page had no example showing how to set 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 !emulator are all implemented, working YAML functions, but had no doc page and were therefore invisible in the sidebar.
  • The {{ .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

  • Documentation
    • Added new docs for YAML functions covering Git metadata (!git.sha, !git.ref, !git.branch, !git.root), repository paths, and emulator connection details (!emulator).
    • Expanded the YAML function index and “Related Functions” sections to improve discoverability of Git helpers.
    • Added guidance for setting AWS provider default_tags with dynamic values and a CI-friendly fallback for detached HEAD.
    • Updated the dynamic provider configuration example to use the correct current-stack variable format.

…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.
@atmos-pro

atmos-pro Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@osterman Erik Osterman (Cloud Posse) (osterman) added the no-release Do not create a new release (wait for additional code changes) label Jul 8, 2026
@github-actions github-actions Bot added the size/m Medium size PR label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 933a7d91-9998-4711-9c40-e1a885e1b5e5

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8fd43 and be78e42.

📒 Files selected for processing (1)
  • website/docs/components/terraform/providers.mdx

📝 Walkthrough

Walkthrough

This PR adds new Atmos YAML function documentation pages for !git.sha, !git.ref, !git.branch, !git.root, and !emulator, cross-links !git.sha into existing git.* function docs, updates the functions index, adds a "Setting Default Tags" section to provider docs, and fixes a template variable reference.

Changes

YAML function and provider documentation

Layer / File(s) Summary
git.sha function documentation
website/docs/functions/yaml/git.sha.mdx
New page documents the !git.sha function's purpose, usage syntax, fallback examples, and related functions.
git.ref function documentation
website/docs/functions/yaml/git.ref.mdx
New page documents !git.ref as an alias of !git.sha with usage and pinning examples.
git.branch function documentation
website/docs/functions/yaml/git.branch.mdx
New page documents !git.branch, including detached-HEAD fallback behavior and examples.
git.root function documentation
website/docs/functions/yaml/git.root.mdx, website/docs/functions/yaml/repo-root.mdx
New page documents !git.root as an alias of !repo-root; repo-root docs gain a matching related-functions link.
emulator function documentation
website/docs/functions/yaml/emulator.mdx
New page documents !emulator, its supported connection keys, usage, and related emulator commands.
Cross-links and index updates
website/docs/functions/yaml/git.host.mdx, git.name.mdx, git.owner.mdx, git.repository.mdx, git.url.mdx, index.mdx
Adds !git.sha related-function links across existing git.* docs and adds new use-case bullets to the functions index.
Provider default_tags documentation and template fix
website/docs/components/terraform/providers.mdx, website/docs/stacks/providers.mdx
Adds a "Setting Default Tags" section with dynamic tag templating example and fixes an Environment tag template to reference vars.stage.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: milldr

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is relevant and summarizes the two main doc changes: AWS default_tags guidance and missing YAML function pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/audit-missing-docs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between cba5d2a and 8f8fd43.

📒 Files selected for processing (14)
  • website/docs/components/terraform/providers.mdx
  • website/docs/functions/yaml/emulator.mdx
  • website/docs/functions/yaml/git.branch.mdx
  • website/docs/functions/yaml/git.host.mdx
  • website/docs/functions/yaml/git.name.mdx
  • website/docs/functions/yaml/git.owner.mdx
  • website/docs/functions/yaml/git.ref.mdx
  • website/docs/functions/yaml/git.repository.mdx
  • website/docs/functions/yaml/git.root.mdx
  • website/docs/functions/yaml/git.sha.mdx
  • website/docs/functions/yaml/git.url.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/repo-root.mdx
  • website/docs/stacks/providers.mdx

Comment thread website/docs/components/terraform/providers.mdx Outdated
default_tags only applies to resources supporting Terraform's `tags`
argument (aws_autoscaling_group is a notable exception), not literally
every resource.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.18%. Comparing base (97846f4) to head (9b05d42).

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 81.18% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aknysh Andriy Knysh (aknysh) merged commit ef726e1 into main Jul 9, 2026
73 checks passed
@aknysh Andriy Knysh (aknysh) deleted the osterman/audit-missing-docs branch July 9, 2026 15:12
@atmos-pro

atmos-pro Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@github-actions

Copy link
Copy Markdown

These changes were released in v1.223.0-rc.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release Do not create a new release (wait for additional code changes) size/m Medium size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants