Skip to content

refactor: move Atmos functions from Learn to Reference section#1503

Merged
aknysh merged 12 commits intomainfrom
move-atmos-functions-to-reference
Sep 25, 2025
Merged

refactor: move Atmos functions from Learn to Reference section#1503
aknysh merged 12 commits intomainfrom
move-atmos-functions-to-reference

Conversation

@osterman
Copy link
Member

@osterman osterman commented Sep 24, 2025

what

  • Moved all Atmos functions (YAML and Template) from the "Learn Atmos" section to a new top-level "Functions" directory that appears in the "Resources" section of the sidebar
  • Created a comprehensive functions index page with overview of both function types
  • Updated all internal documentation links (30+ references) to point to the new locations
  • Fixed frontmatter IDs for proper Docusaurus integration

why

  • The Atmos functions are reference material, not learning content. They were confusing to find buried deep in the "Learn Atmos" section
  • Users looking for function documentation need quick access to technical specifications, not tutorials
  • This provides clearer separation between conceptual learning materials and technical reference documentation
  • The new structure uses simpler, more intuitive URLs (/functions/yaml/env vs /core-concepts/stacks/yaml-functions/env)

references

  • Addresses the issue discussed about reorganizing documentation to separate learning paths from reference materials
  • Documentation builds successfully with no broken links

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added a consolidated "Functions" area with a top-level index, separate "YAML Functions" and "Template Functions" sections, and several new function pages (including template and YAML entries).
    • Migrated many internal links to a unified /functions namespace and added extensive redirects to preserve old paths.
    • Updated sidebar structure, ordering, and front-matter metadata (sidebar classes/positions) to improve navigation and presentation.

Reorganized documentation structure to provide clearer separation between
learning materials and reference documentation.

## Changes:
- Moved YAML functions from /core-concepts/stacks/yaml-functions/ to /functions/yaml/
- Moved template functions from /core-concepts/stacks/templates/functions/ to /functions/template/
- Created main functions index page at /functions/index.mdx
- Updated 30+ internal links across documentation to new locations
- Updated sidebar configuration to display Functions under Resources
- Fixed frontmatter IDs for proper Docusaurus integration

## Benefits:
- Clear separation between tutorials and reference docs
- Better discoverability of all functions in one location
- Simpler, more intuitive URL structure
- Improved navigation for users seeking function references

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@osterman osterman requested a review from a team as a code owner September 24, 2025 02:27
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

📝 Walkthrough

Walkthrough

Moved and consolidated function documentation under a new /functions namespace, added a Functions landing page and sidebar entries, updated many internal doc links and front-matter metadata, added redirects for old paths, and added a few new function docs. No code/runtime or public API changes.

Changes

Cohort / File(s) Summary
CLI docs link updates
website/docs/cli/configuration/configuration.mdx, website/docs/cli/configuration/stacks.mdx
Updated links to YAML and template function docs to the new /functions/* paths.
Core concepts link updates
website/docs/core-concepts/...
projects/configuration/stores.mdx, share-data/remote-state.mdx, share-data/share-data.mdx, stacks/templates/datasources.mdx, stacks/templates/templates.mdx, vendor/vendor-manifest.mdx
Replaced /core-concepts/stacks/... references with /functions/yaml/* and /functions/template/*; minor wording/tip adjustments.
Functions landing & index pages
website/docs/functions/index.mdx, website/docs/functions/yaml/index.mdx, website/docs/functions/template/index.mdx
Added Functions landing and YAML/Template index pages; updated front-matter, intro text, and many in-doc cross-links.
YAML function docs (metadata & links)
website/docs/functions/yaml/*
env.mdx, exec.mdx, include.mdx, include.raw.mdx, repo-root.mdx, store.mdx, store.get.mdx, template.mdx, terraform.output.mdx, terraform.state.mdx
Added/updated sidebar_class_name: command metadata on many pages; migrated internal links/anchors to /functions/yaml/*; adjusted references to template functions at /functions/template/*.
Template function docs (metadata & new doc)
website/docs/functions/template/*
atmos.Component.mdx, atmos.GomplateDatasource.mdx, atmos.Store.mdx
Added/updated front-matter (e.g., sidebar_class_name: command); added atmos.GomplateDatasource.mdx; migrated links to /functions/template/*; small text/tip edits.
Quick start
website/docs/quick-start/simple/write-components.mdx
Updated Atmos template function link to /functions/template.
Sidebar navigation
website/sidebars.js
Added top-level "Functions" category with "YAML Functions" and "Template Functions" subcategories (autogenerated from functions/yaml and functions/template).
Redirects / config
website/docusaurus.config.js
Added numerous redirects mapping old /core-concepts/... and related paths to new /functions/... paths (plus main indices and aliases).
Internal README & test fixture comment
internal/terraform_backend/README.md, tests/fixtures/scenarios/stack-name-template/atmos.yaml
Updated internal doc and fixture comment links to new /functions/* locations.

Sequence Diagram(s)

(Skipped — changes are documentation, navigation, and redirect updates without runtime control-flow modifications.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • milldr
  • kevcube

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely describes the primary change—a refactor that moves Atmos functions from the Learn section to the Reference section—directly reflecting the PR’s objective to reorganize documentation without adding unnecessary detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-atmos-functions-to-reference

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 5827d5d and abaf3c5.

📒 Files selected for processing (2)
  • website/docs/cli/configuration/stacks.mdx (1 hunks)
  • website/docusaurus.config.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/docusaurus.config.js
🧰 Additional context used
📓 Path-based instructions (1)
website/**

📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)

website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use cases

Files:

  • website/docs/cli/configuration/stacks.mdx
🧠 Learnings (1)
📓 Common learnings
Learnt from: Listener430
PR: cloudposse/atmos#934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
⏰ 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). (8)
  • GitHub Check: Analyze (go)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Build (ubuntu-latest, linux)
  • GitHub Check: website-deploy-preview
  • GitHub Check: Run pre-commit hooks
  • GitHub Check: Summary
🔇 Additional comments (1)
website/docs/cli/configuration/stacks.mdx (1)

115-118: Link update matches new functions namespace.
Nice alignment with the relocated template docs.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.02%. Comparing base (2dcc478) to head (abaf3c5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1503      +/-   ##
==========================================
+ Coverage   56.98%   57.02%   +0.03%     
==========================================
  Files         284      284              
  Lines       30292    30292              
==========================================
+ Hits        17261    17273      +12     
+ Misses      11207    11193      -14     
- Partials     1824     1826       +2     
Flag Coverage Δ
unittests 57.02% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@osterman osterman added the no-release Do not create a new release (wait for additional code changes) label Sep 24, 2025
- Moved Functions section above Commands in the sidebar for better prominence
- Added sidebar_class_name: command to all function pages for consistent formatting
- Simplified Functions index page to match Commands formatting style
- Functions are now more prominently displayed in the Reference section with code-style formatting
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
website/docs/functions/yaml/repo-root.mdx (1)

16-22: Fix grammar and YAML example formatting

  • Add “a” in “with a default value”.
  • Remove stray backticks in YAML example.
-The `!repo-root` function can be called with default value:
+The `!repo-root` function can be called with a default value:
@@
-  `!repo-root <default-value>`
+  !repo-root <default-value>
website/docs/functions/template/atmos.Component.mdx (1)

324-326: Example likely breaks: !template without toJson

!template expects JSON; passing a rendered list/map without toJson will not parse reliably. Align with guidance above.

-        allowed_ips: !template '{{ (atmos.Component "static-backend" .stack).outputs.allowed_ips }}'
-        tags: !template '{{ (atmos.Component "static-backend" .stack).outputs.tags }}'
+        allowed_ips: !template '{{ toJson (atmos.Component "static-backend" .stack).outputs.allowed_ips }}'
+        tags: !template '{{ toJson (atmos.Component "static-backend" .stack).outputs.tags }}'
website/docs/functions/yaml/store.mdx (2)

19-21: Parameter count text inconsistent with examples

Docs say “two, three, or four” params, but examples show 3 or 4 (with/without explicit stack). Update wording.

-The `!store` function can be called with either two, three, or four parameters, and optionally a default value and
+The `!store` function can be called with either three or four parameters, and optionally a default value and

118-121: Wrong function name referenced

Should reference !store, not !terraform.output.

-There are multiple ways you can specify the Atmos stack parameter in the `!terraform.output` function.
+There are multiple ways you can specify the Atmos stack parameter in the `!store` function.
🧹 Nitpick comments (15)
website/docs/functions/yaml/include.raw.mdx (3)

9-11: Remove unused import

File component is imported but not used.

Apply this diff:

 import Intro from '@site/src/components/Intro'
-import File from '@site/src/components/File'
 import Note from "@site/src/components/Note"

115-116: Tighten note about query params (avoid implying extension detection matters here)

include.raw ignores extensions entirely; clarify the comment to prevent confusion.

Apply this diff:

-  # With query parameters (extension detection ignores query strings)
+  # With query parameters (behavior unchanged; content returned as-is)

1-7: Add redirects for moved path (preserve external links/SEO)

This page moved from /core-concepts/... to /functions/.... Ensure client redirects are configured (in docusaurus.config.js via @docusaurus/plugin-client-redirects) from old URLs to the new ones.

I can draft a redirects entry if you confirm the old path(s) for this doc (e.g., /core-concepts/stacks/yaml-functions/include.raw).

website/docs/functions/template/atmos.GomplateDatasource.mdx (1)

86-88: Fix typo: “presend” → “present”.

Minor text polish.

-  It detects that the result for the same datasource alias `ip` is already presend in the memory cache and reuses it
+  It detects that the result for the same datasource alias `ip` is already present in the memory cache and reuses it
website/docs/core-concepts/vendor/vendor-manifest.mdx (1)

303-309: Wording tweak to match the target page scope.

“hundreds of go-template functions” could be misread as only core Go template funcs; the hub also links Sprig/Gomplate. Suggest generic “Template Functions”.

-You can also use any of the [hundreds of go-template functions](/functions/template). For example, to extract the major and minor version from the `{{ .Version }}` attribute, use the following template:
+You can also use a wide range of [Template Functions](/functions/template). For example, to extract the major and minor version from the `{{ .Version }}` attribute, use the following template:
website/docs/quick-start/simple/write-components.mdx (1)

112-112: Link Atmos function to retrieve the state to !terraform.output docs

Replace the generic template link in website/docs/quick-start/simple/write-components.mdx (around line 112):

-... or the [Atmos function to retrieve the state](/functions/template) of any other component.
+... or the [Atmos YAML function `!terraform.output`](/functions/yaml/terraform.output) to retrieve the state of any other component.
website/docs/core-concepts/stacks/templates/templates.mdx (1)

84-86: Typo: settings key uses comma instead of dot

Replace templates.settings,gomplate.enabled with templates.settings.gomplate.enabled.

-  `templates.settings.sprig.enabled` and `templates.settings,gomplate.enabled` settings
+  `templates.settings.sprig.enabled` and `templates.settings.gomplate.enabled` settings
website/docs/functions/yaml/repo-root.mdx (1)

28-36: Minor punctuation for clarity

Consider adding a comma after “if present,”.

-  # `base_path` will be set to the root directory of the Atmos repository if present otherwise it will return an error
+  # `base_path` will be set to the root directory of the Atmos repository if present, otherwise it will return an error
website/docs/functions/yaml/store.mdx (1)

155-159: Clarify “two parameters” note

Current-text implies a 2‑arg variant; examples use 3 args when omitting stack. Replace “two” with “three”.

-`!store` function with two parameters without specifying the current stack, but without using `Go` templates. If you
-need to get a value from the store from a component in the current stack, using the `!store` function with two
+`!store` function with three parameters (without specifying the stack via template identifiers). If you
+need to get a value from the store from a component in the current stack, using the `!store` function with three
website/docs/core-concepts/projects/configuration/stores.mdx (1)

91-93: Tighten NOTE phrasing

Remove the duplicate/fragmented sentence.

-**NOTE:** Storing sensitive access tokens in plain text in `atmos.yaml` is not secure and should be avoided. However, it's recommended for the `anonymous` use case or when managing multiple Artifactory stores with different access tokens. In such cases, use [`!env`](/functions/yaml/env) function to reference tokens securely.
-YAML function to set the access token from an environment variable.
+**NOTE:** Storing sensitive access tokens in plain text in `atmos.yaml` is not secure and should be avoided. For `anonymous` or when managing multiple stores, use the [`!env`](/functions/yaml/env) YAML function to set the access token from an environment variable.
website/docs/functions/template/index.mdx (2)

3-7: Frontmatter updates look good; minor copy edit for description

Suggest tightening the wording.

-description: Atmos functions for the Go's template language.
+description: Atmos functions for the Go template language.

28-28: Self-link is okay; consider linking to a specific subpage

Optional: point to a commonly used function (e.g., atmos.Component) to reduce circular navigation.

website/docs/functions/yaml/exec.mdx (1)

41-45: Grammar fix in warning block

Tiny cleanup for readability.

-`!exec atmos terraform output` is just as examples to show that you can get the outputs of an Atmos component using
-the `!exec` YAML function, but it's not recommended to use.
+`!exec atmos terraform output` examples demonstrate that you can get the outputs of an Atmos component using
+the `!exec` YAML function, but it's not recommended.
website/docs/functions/yaml/terraform.output.mdx (1)

334-336: Nit: correct command name

“terraform outputs” → “terraform output”.

-The cache is per Atmos CLI command execution, e.g., each new execution of a command like `atmos terraform plan`,
-`atmos terraform apply` or `atmos describe component` will create and use a new memory cache, which involves re-invoking `terraform outputs` after reinitialization.
+The cache is per Atmos CLI command execution, e.g., each new execution of a command like `atmos terraform plan`,
+`atmos terraform apply` or `atmos describe component` will create and use a new memory cache, which involves re-invoking `terraform output` after reinitialization.
website/sidebars.js (1)

171-206: Confirm intended navigation placement for “Functions”

PR summary says Functions lives under “Resources,” but here it’s a top-level category under the CLI sidebar (sibling to Configuration/Commands/Resources). If the goal is to nest under “Resources,” move this block into the Resources.items list; otherwise, update the PR description.

If you want it under “Resources”, remove this block and add it inside the Resources category:

-        {
-            type: 'category',
-            label: 'Functions',
-            className: 'sidebar-title',
-            collapsible: false,
-            collapsed: false,
-            link: {type: 'doc', id: 'functions/index'},
-            items: [
-                {
-                    type: 'category',
-                    label: 'YAML Functions',
-                    link: {type: 'doc', id: 'functions/yaml/index'},
-                    collapsible: true,
-                    collapsed: false,
-                    items: [
-                        {
-                            type: 'autogenerated',
-                            dirName: 'functions/yaml',
-                        }
-                    ]
-                },
-                {
-                    type: 'category',
-                    label: 'Template Functions',
-                    link: {type: 'doc', id: 'functions/template/index'},
-                    collapsible: true,
-                    collapsed: false,
-                    items: [
-                        {
-                            type: 'autogenerated',
-                            dirName: 'functions/template',
-                        }
-                    ]
-                }
-            ]
-        },

Add inside the Resources category’s items array:

{
  type: 'category',
  label: 'Functions',
  className: 'sidebar-title',
  collapsible: false,
  collapsed: false,
  link: { type: 'doc', id: 'functions/index' },
  items: [
    {
      type: 'category',
      label: 'YAML Functions',
      link: { type: 'doc', id: 'functions/yaml/index' },
      collapsible: true,
      collapsed: false,
      items: [{ type: 'autogenerated', dirName: 'functions/yaml' }],
    },
    {
      type: 'category',
      label: 'Template Functions',
      link: { type: 'doc', id: 'functions/template/index' },
      collapsible: true,
      collapsed: false,
      items: [{ type: 'autogenerated', dirName: 'functions/template' }],
    },
  ],
}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6274d75 and bef5052.

📒 Files selected for processing (26)
  • website/docs/cli/configuration/configuration.mdx (2 hunks)
  • website/docs/cli/configuration/stacks.mdx (1 hunks)
  • website/docs/core-concepts/projects/configuration/stores.mdx (3 hunks)
  • website/docs/core-concepts/share-data/remote-state.mdx (2 hunks)
  • website/docs/core-concepts/share-data/share-data.mdx (5 hunks)
  • website/docs/core-concepts/stacks/templates/datasources.mdx (1 hunks)
  • website/docs/core-concepts/stacks/templates/templates.mdx (3 hunks)
  • website/docs/core-concepts/vendor/vendor-manifest.mdx (1 hunks)
  • website/docs/functions/index.mdx (1 hunks)
  • website/docs/functions/template/atmos.Component.mdx (2 hunks)
  • website/docs/functions/template/atmos.GomplateDatasource.mdx (1 hunks)
  • website/docs/functions/template/atmos.Store.mdx (2 hunks)
  • website/docs/functions/template/index.mdx (2 hunks)
  • website/docs/functions/yaml/env.mdx (1 hunks)
  • website/docs/functions/yaml/exec.mdx (2 hunks)
  • website/docs/functions/yaml/include.mdx (1 hunks)
  • website/docs/functions/yaml/include.raw.mdx (2 hunks)
  • website/docs/functions/yaml/index.mdx (2 hunks)
  • website/docs/functions/yaml/repo-root.mdx (1 hunks)
  • website/docs/functions/yaml/store.get.mdx (3 hunks)
  • website/docs/functions/yaml/store.mdx (1 hunks)
  • website/docs/functions/yaml/template.mdx (5 hunks)
  • website/docs/functions/yaml/terraform.output.mdx (2 hunks)
  • website/docs/functions/yaml/terraform.state.mdx (3 hunks)
  • website/docs/quick-start/simple/write-components.mdx (1 hunks)
  • website/sidebars.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
website/**

📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)

website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use cases

Files:

  • website/docs/cli/configuration/stacks.mdx
  • website/docs/functions/yaml/env.mdx
  • website/docs/functions/template/atmos.Component.mdx
  • website/docs/cli/configuration/configuration.mdx
  • website/docs/functions/yaml/repo-root.mdx
  • website/docs/functions/yaml/terraform.output.mdx
  • website/docs/functions/template/index.mdx
  • website/docs/functions/template/atmos.GomplateDatasource.mdx
  • website/docs/core-concepts/stacks/templates/datasources.mdx
  • website/sidebars.js
  • website/docs/functions/template/atmos.Store.mdx
  • website/docs/core-concepts/vendor/vendor-manifest.mdx
  • website/docs/functions/yaml/include.raw.mdx
  • website/docs/functions/index.mdx
  • website/docs/functions/yaml/template.mdx
  • website/docs/core-concepts/projects/configuration/stores.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/exec.mdx
  • website/docs/functions/yaml/store.mdx
  • website/docs/functions/yaml/include.mdx
  • website/docs/functions/yaml/terraform.state.mdx
  • website/docs/functions/yaml/store.get.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/quick-start/simple/write-components.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
  • website/docs/core-concepts/share-data/share-data.mdx
🧠 Learnings (20)
📓 Common learnings
Learnt from: Listener430
PR: cloudposse/atmos#934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!env` is used to retrieve environment variables and assign them to sections in stack manifests. It supports both simple types (string, number, boolean) and complex types (JSON-encoded lists, maps, objects).

Applied to files:

  • website/docs/functions/yaml/env.mdx
  • website/docs/functions/template/atmos.Component.mdx
  • website/docs/cli/configuration/configuration.mdx
  • website/docs/functions/yaml/terraform.output.mdx
  • website/docs/functions/yaml/include.raw.mdx
  • website/docs/functions/yaml/template.mdx
  • website/docs/core-concepts/projects/configuration/stores.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/exec.mdx
  • website/docs/functions/yaml/terraform.state.mdx
  • website/docs/functions/yaml/store.get.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
  • website/docs/core-concepts/share-data/share-data.mdx
📚 Learning: 2024-12-01T00:33:20.298Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml:28-32
Timestamp: 2024-12-01T00:33:20.298Z
Learning: In `examples/tests/stacks/catalog/terraform/template-functions-test2/defaults.yaml`, `!exec atmos terraform output` is used in examples to demonstrate its usage, even though `!terraform.output` is the recommended approach according to the documentation.

Applied to files:

  • website/docs/functions/template/atmos.Component.mdx
  • website/docs/cli/configuration/configuration.mdx
  • website/docs/functions/yaml/terraform.output.mdx
  • website/docs/functions/template/atmos.Store.mdx
  • website/docs/functions/yaml/template.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/exec.mdx
  • website/docs/functions/yaml/terraform.state.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/quick-start/simple/write-components.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
  • website/docs/core-concepts/share-data/share-data.mdx
📚 Learning: 2025-01-19T22:30:27.600Z
Learnt from: aknysh
PR: cloudposse/atmos#0
File: :0-0
Timestamp: 2025-01-19T22:30:27.600Z
Learning: The Atmos YAML function `!include` allows downloading local or remote files from different sources and assigning their contents to sections in stack manifests. It supports various protocols (file, http, git, s3, etc.) and can filter content using YQ expressions.

Applied to files:

  • website/docs/cli/configuration/configuration.mdx
  • website/docs/functions/yaml/terraform.output.mdx
  • website/docs/functions/yaml/include.raw.mdx
  • website/docs/functions/yaml/template.mdx
  • website/docs/core-concepts/projects/configuration/stores.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/include.mdx
  • website/docs/functions/yaml/store.get.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
📚 Learning: 2025-01-25T03:49:03.951Z
Learnt from: Listener430
PR: cloudposse/atmos#934
File: internal/exec/template_utils.go:268-271
Timestamp: 2025-01-25T03:49:03.951Z
Learning: The `ProcessTmplWithDatasourcesGomplate` function in `internal/exec/template_utils.go` is used for documentation generation purposes, where simple environment variable handling is acceptable and thread-safety concerns are not critical.

Applied to files:

  • website/docs/cli/configuration/configuration.mdx
📚 Learning: 2025-09-23T03:44:59.111Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-23T03:44:59.111Z
Learning: Applies to internal/exec/template_funcs.go : All new configs MUST support Go templating using FuncMap() from internal/exec/template_funcs.go for template functions

Applied to files:

  • website/docs/cli/configuration/configuration.mdx
  • website/docs/functions/template/index.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
📚 Learning: 2024-12-03T04:01:16.446Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:0-0
Timestamp: 2024-12-03T04:01:16.446Z
Learning: In the `terraform.output.mdx` documentation file (`website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx`), the cache invalidation and cache scope behavior for the `!terraform.output` function are already described.

Applied to files:

  • website/docs/functions/yaml/terraform.output.mdx
  • website/docs/functions/yaml/template.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/exec.mdx
  • website/docs/functions/yaml/terraform.state.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/quick-start/simple/write-components.mdx
  • website/docs/core-concepts/share-data/share-data.mdx
📚 Learning: 2025-09-23T03:44:59.111Z
Learnt from: CR
PR: cloudposse/atmos#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-23T03:44:59.111Z
Learning: Applies to pkg/store/*_store.go : One implementation per file for interfaces (e.g., aws_ssm_store.go, azure_keyvault_store.go, google_secretmanager_store.go in pkg/store/)

Applied to files:

  • website/docs/functions/template/atmos.Store.mdx
📚 Learning: 2024-12-03T05:18:49.169Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: internal/exec/terraform_utils.go:40-213
Timestamp: 2024-12-03T05:18:49.169Z
Learning: In the context of the Atmos project, it's acceptable for functions like `execTerraformOutput` to remain as single functions if they perform a single purpose, such as retrieving Terraform outputs for a component in a stack, even if the function is lengthy.

Applied to files:

  • website/docs/functions/yaml/template.mdx
  • website/docs/functions/yaml/index.mdx
  • website/docs/functions/yaml/exec.mdx
  • website/docs/core-concepts/share-data/remote-state.mdx
  • website/docs/core-concepts/stacks/templates/templates.mdx
📚 Learning: 2024-12-03T03:49:30.395Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: website/docs/core-concepts/stacks/yaml-functions/terraform.output.mdx:104-110
Timestamp: 2024-12-03T03:49:30.395Z
Learning: In the documentation for `!terraform.output`, warnings about template variable availability are already covered in other sections, so no need to suggest adding them here.

Applied to files:

  • website/docs/functions/yaml/template.mdx
  • website/docs/functions/yaml/exec.mdx
📚 Learning: 2025-03-18T12:26:25.329Z
Learnt from: Listener430
PR: cloudposse/atmos#1149
File: tests/snapshots/TestCLICommands_atmos_vendor_pull_ssh.stderr.golden:7-7
Timestamp: 2025-03-18T12:26:25.329Z
Learning: In the Atmos project, typos or inconsistencies in test snapshot files (such as "terrafrom" instead of "terraform") may be intentional as they capture the exact output of commands and should not be flagged as issues requiring correction.

Applied to files:

  • website/docs/functions/yaml/template.mdx
📚 Learning: 2024-12-03T05:29:07.718Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: internal/exec/terraform_utils.go:145-146
Timestamp: 2024-12-03T05:29:07.718Z
Learning: In the Atmos project, a 5-minute timeout in the `execTerraformOutput` function is acceptable for retrieving `terraform output` for a component in a stack.

Applied to files:

  • website/docs/functions/yaml/template.mdx
  • website/docs/functions/yaml/exec.mdx
📚 Learning: 2024-11-25T17:17:15.703Z
Learnt from: RoseSecurity
PR: cloudposse/atmos#797
File: pkg/list/atmos.yaml:213-214
Timestamp: 2024-11-25T17:17:15.703Z
Learning: The file `pkg/list/atmos.yaml` is primarily intended for testing purposes.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2025-02-11T08:21:33.143Z
Learnt from: shirkevich
PR: cloudposse/atmos#1034
File: website/docs/core-concepts/projects/configuration/stores.mdx:173-177
Timestamp: 2025-02-11T08:21:33.143Z
Learning: The parameter for configuring stack path delimiter in store configurations is consistently named `stack_delimiter` (not `stacks_delimiter`) across all store types in Atmos.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2024-12-11T18:40:12.808Z
Learnt from: Listener430
PR: cloudposse/atmos#844
File: cmd/helmfile.go:37-37
Timestamp: 2024-12-11T18:40:12.808Z
Learning: In the atmos project, `cliConfig` is initialized within the `cmd` package in `root.go` and can be used in other command files.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2025-04-25T20:54:19.701Z
Learnt from: mcalhoun
PR: cloudposse/atmos#963
File: website/docs/core-concepts/projects/configuration/stores.mdx:286-286
Timestamp: 2025-04-25T20:54:19.701Z
Learning: For the AWS SSM Parameter Store implementation in Atmos, support for `read_role_arn` and `write_role_arn` options is essential to enable cross-account access, allowing users to run operations like `terraform plan` in multiple accounts while accessing values across keystores. Azure Key Vault would need similar capabilities for cross-tenant/subscription authentication.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2025-09-10T17:34:52.568Z
Learnt from: Benbentwo
PR: cloudposse/atmos#1475
File: pkg/auth/providers/github/oidc.go:96-100
Timestamp: 2025-09-10T17:34:52.568Z
Learning: The ATMOS_ environment variable binding guideline applies to Atmos configuration variables, not external service-required environment variables like GitHub Actions OIDC variables (GITHUB_ACTIONS, ACTIONS_ID_TOKEN_*) which must use their standard names.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2025-01-09T19:53:29.847Z
Learnt from: Listener430
PR: cloudposse/atmos#912
File: pkg/config/config.go:91-92
Timestamp: 2025-01-09T19:53:29.847Z
Learning: In the Atmos project, the `core.inject_github_token` configuration is required to be enabled (`true`) by default to support authenticated GitHub requests and help bypass rate limits.

Applied to files:

  • website/docs/core-concepts/projects/configuration/stores.mdx
📚 Learning: 2024-12-03T03:52:02.524Z
Learnt from: aknysh
PR: cloudposse/atmos#810
File: internal/exec/terraform_utils.go:144-145
Timestamp: 2024-12-03T03:52:02.524Z
Learning: Avoid adding context timeouts to Terraform commands in `execTerraformOutput` because their execution time can vary from seconds to hours, and making it configurable would require redesigning the command interface.

Applied to files:

  • website/docs/functions/yaml/exec.mdx
📚 Learning: 2024-12-12T15:17:45.245Z
Learnt from: osterman
PR: cloudposse/atmos#808
File: examples/demo-atmos.d/atmos.d/tools/helmfile.yml:10-10
Timestamp: 2024-12-12T15:17:45.245Z
Learning: In `examples/demo-atmos.d/atmos.d/tools/helmfile.yml`, when suggesting changes to `kubeconfig_path`, ensure that the values use valid Go template syntax.

Applied to files:

  • website/docs/core-concepts/stacks/templates/templates.mdx
⏰ 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). (8)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Build (ubuntu-latest, linux)
  • GitHub Check: Lint (golangci)
  • GitHub Check: Analyze (go)
  • GitHub Check: website-deploy-preview
  • GitHub Check: Run pre-commit hooks
  • GitHub Check: Summary
🔇 Additional comments (34)
website/docs/functions/yaml/include.raw.mdx (2)

200-204: LGTM — See Also link is valid

website/docs/functions/yaml/index.mdx exists and has title "Atmos YAML Functions" (sidebar_label: YAML Functions).


5-5: Keep sidebar_class_name: command — consistent with the majority

13 files use command vs 3 index files using hidden; include.raw.mdx matches the command convention, no change required.

website/docs/core-concepts/stacks/templates/datasources.mdx (1)

100-101: Good path migration to the new Template Functions hub.

The new link to /functions/template reads well in context.

website/docs/functions/template/atmos.GomplateDatasource.mdx (1)

5-5: LGTM. Sidebar class added for consistent nav styling.

website/docs/functions/yaml/env.mdx (1)

5-5: LGTM. Sidebar metadata matches the Functions taxonomy.

website/docs/functions/template/atmos.Store.mdx (2)

5-5: LGTM. Sidebar metadata matches other function pages.


235-239: Nice: links updated to the new YAML function location.

Reads cleanly and matches the reorg.

website/docs/functions/yaml/include.mdx (1)

5-5: LGTM — Sidebar metadata aligns with new Functions section.
Verified ./include.raw exists at website/docs/functions/yaml/include.raw.mdx.

website/docs/cli/configuration/stacks.mdx (1)

109-113: LGTM — Template Functions link verified
Link points to /functions/template and repo-wide search found no lingering old paths.

website/docs/functions/yaml/store.get.mdx (2)

5-5: LGTM: sidebar_class_name alignment

Consistent with other function pages.


67-79: Links updated to new /functions paths look correct

References to /functions/yaml/store are consistent. No further action.

website/docs/core-concepts/stacks/templates/templates.mdx (3)

19-21: Updated “Atmos Functions” link to /functions/yaml

Looks good and matches new structure.


139-144: Template functions links migrated to /functions/template

CTA and list item updates look correct.


370-371: Manual link-check required — cannot confirm atmos.Component anchor

website/docs/core-concepts/stacks/templates/templates.mdx (lines 370–371) links to /functions/template/atmos.Component but sandbox ripgrep returned "No files were searched" and I couldn't locate the target functions doc to verify the handling-outputs-containing-maps-or-lists slug; run a site link-check or confirm the functions page exposes that anchor.

website/docs/functions/yaml/template.mdx (2)

5-5: LGTM: sidebar_class_name set to command

Matches other YAML function pages.


14-16: Link migrations to /functions are consistent

  • atmos.Component refs → /functions/template/atmos.Component
  • !terraform.output ref → /functions/yaml/terraform.output
    All good.

Also applies to: 30-30, 106-107, 137-139

website/docs/functions/template/atmos.Component.mdx (2)

5-5: LGTM: sidebar_class_name added

Matches conventions.


143-144: !template link path migrated correctly

Points to /functions/yaml/template.

website/docs/functions/yaml/store.mdx (1)

5-5: LGTM: sidebar_class_name set

Consistent with other function docs.

website/docs/core-concepts/projects/configuration/stores.mdx (1)

12-14: Links to /functions updated correctly

  • !store → /functions/yaml/store
  • atmos.Store → /functions/template/atmos.Store

Please confirm that website/docs/functions/template/atmos.Store.mdx exists and exports the expected ID so these links resolve.

Also applies to: 26-27

website/docs/functions/index.mdx (2)

1-10: Front matter fields: verify collapsible/collapsed support

Docusaurus typically controls collapsibility in sidebars.js categories, not doc front matter. These may be ignored.

If unsupported, remove these and set collapsibility in sidebars.js.


13-19: LGTM: Clear landing page with DocCardList

Concise intro; renders child items.

website/docs/functions/yaml/exec.mdx (1)

5-5: Sidebar class name

Consistent with other YAML functions. Good.

website/docs/functions/yaml/terraform.state.mdx (2)

5-5: Sidebar class name

Consistent with YAML function pages.


24-26: Good cross-links to alternatives

Pointing to !store and !terraform.output here is helpful.

website/docs/functions/yaml/terraform.output.mdx (1)

5-5: YAML function doc moves and cross-links look correct

Consistent sidebar class and updated references to /functions/yaml/... are good.

Also applies to: 95-97, 100-102

website/docs/functions/yaml/index.mdx (1)

3-6: Frontmatter + label updates

Looks consistent with new structure.

website/docs/core-concepts/share-data/share-data.mdx (7)

62-65: Link updated to new Functions location looks good

The !store CTA now points to /functions/yaml/store. Change aligns with the reorg.


95-98: Updated !terraform.output link is correct

CTA now targets /functions/yaml/terraform.output.


102-102: Inline link migration to !terraform.state docs looks correct

Points to /functions/yaml/terraform.state. Text and remaining links read well.


125-128: Updated !terraform.state CTA link is correct

CTA now targets /functions/yaml/terraform.state.


169-172: Updated atmos.Store link is correct

CTA now targets /functions/template/atmos.Store.


200-203: Updated atmos.Component link is correct

CTA now targets /functions/template/atmos.Component.


131-139: Verify Execution Flow anchors for terraform.output & terraform.state

Repo search found no headings matching #terraformoutput-function-execution-flow or #terraformstate-function-execution-flow. Confirm those headings exist on /functions/yaml/terraform.output and /functions/yaml/terraform.state, or update the links in website/docs/core-concepts/share-data/share-data.mdx (lines 131–139) to the actual section slugs (e.g. #execution-flow).

- Updated internal/terraform_backend/README.md to point to new function path
- Updated test fixture atmos.yaml to use new atmos.tools/functions URL
- All function documentation links now correctly reference /functions/ paths
- Verified all links resolve correctly with successful documentation build
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 24, 2025
- Updated description to highlight it's the FASTEST way to retrieve Terraform outputs
- Enhanced intro to clearly state performance advantages over !terraform.output
- Expanded performance tip to quantify speed improvements (10-100x faster)
- Listed specific overheads that !terraform.state bypasses
- Made the value proposition clearer for users choosing between functions
- Added comprehensive explanation of why YAML functions are safer and recommended
- Explained that YAML functions are native YAML features working with parsed data
- Warned about template functions manipulating raw text before parsing
- Added detailed pitfalls and safety guidelines for template functions
- Included migration strategies from template to YAML functions
- Changed PillBox from 'Advanced' to 'Recommended' for YAML functions
- Added 'Use with Caution' warning to Template functions
- Provided concrete examples of common template function failures
…nations

- Added comprehensive 'What are Datasources?' section explaining the concept
- Listed common use cases (service discovery, dynamic config, secrets, etc.)
- Moved caching details to dedicated 'How it Works' section
- Added comparison table between direct datasource and cached version
- Included practical examples for APIs, AWS SSM, and file loading
- Added performance example showing 5 calls vs 1 cached call
- Listed all supported datasource types (HTTP, AWS, Vault, etc.)
- Improved description to be more actionable and clear
- Rewrote intro to immediately explain the value: stop hardcoding values
- Added problem/solution format to clarify why datasources matter
- Included before/after example showing hardcoded vs dynamic values
- Highlighted security and maintenance benefits
- Made the description action-oriented and compelling
- Explained datasources as 'live connections to your data'
@github-actions github-actions bot added size/l Large size PR and removed size/m Medium size PR labels Sep 25, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 25, 2025
- Add redirects for all template functions moved to /functions/template/
- Add redirects for all YAML functions moved to /functions/yaml/
- Add redirect for main functions index page
- Ensure backward compatibility for existing documentation links
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6ce6691 and 5827d5d.

📒 Files selected for processing (1)
  • website/docusaurus.config.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
website/**

📄 CodeRabbit inference engine (.cursor/rules/atmos-rules.mdc)

website/**: Update website documentation in website/ when adding features
Ensure consistency between CLI help text and website documentation
Follow the website's documentation structure and style
Keep website code in website/ and follow its architecture/style; test changes locally
Keep CLI and website documentation in sync; document new features with examples and use cases

Files:

  • website/docusaurus.config.js
🧠 Learnings (1)
📓 Common learnings
Learnt from: Listener430
PR: cloudposse/atmos#934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
⏰ 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). (9)
  • GitHub Check: Build (ubuntu-latest, linux)
  • GitHub Check: Build (windows-latest, windows)
  • GitHub Check: Build (macos-latest, macos)
  • GitHub Check: Run pre-commit hooks
  • GitHub Check: website-deploy-preview
  • GitHub Check: PR Semver Labels
  • GitHub Check: Lint (golangci)
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary

- Change redirect sources from '/core-concepts/stacks/templates/functions/...'
  to '/core-concepts/stacks/yaml-functions/...' for all YAML functions
- Add redirect for '/core-concepts/stacks/yaml-functions' index to '/functions'
- Ensures proper redirection from actual legacy URLs to new reference section
@aknysh aknysh merged commit e15c114 into main Sep 25, 2025
53 checks passed
@aknysh aknysh deleted the move-atmos-functions-to-reference branch September 25, 2025 14:20
@github-actions
Copy link

These changes were released in v1.191.1-test.0.

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/l Large size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants