Skip to content

feat(skills): add Terramate migration reference to atmos-migration - #2871

Open
Erik Osterman (Cloud Posse) (osterman) wants to merge 6 commits into
mainfrom
osterman/terramate-migration-skill
Open

feat(skills): add Terramate migration reference to atmos-migration#2871
Erik Osterman (Cloud Posse) (osterman) wants to merge 6 commits into
mainfrom
osterman/terramate-migration-skill

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Aug 5, 2026

Copy link
Copy Markdown
Member

what

  • Adds a new references/from-terramate.md reference file to the atmos-migration agent skill, giving a construct-by-construct mapping from a Terramate project to Atmos: stack.tm.hcl, hierarchical globals, generate_hcl mixins/generators, script{} orchestration, tags/labels, tm_* functions, Terramate Cloud sync, the _bootstrap/ two-phase pattern, and .tmtriggers/.
  • Wires the new reference into atmos-migration/SKILL.md's frontmatter, "Decide the Migration Shape First" routing table, and "Additional Resources" section, following the same pattern already used for native-Terraform and Terraform-Workspaces migrations.
  • Updates the atmos-migration row in agent-skills/AGENTS.md's skill index to mention Terramate.
  • Documents the real, shipped metadata.tags/metadata.labels syntax, --tags/--labels CLI filtering, and --include-dependencies/--include-dependents closure selection, and flags the one remaining gap: no Atmos equivalent to Terramate's .tmtriggers/ change-detection overrides.

why

references

Summary by CodeRabbit

  • New Features

    • Added comprehensive documentation for migrating from Terramate to Atmos.
    • Documented mappings for stacks, globals, generated configuration, components, scripts, dependencies, and workflows.
    • Added guidance on migration limitations, naming, state preservation, and common pitfalls.
  • Documentation

    • Added Terramate migration links throughout relevant learning and stack documentation.
    • Added the migration guide to the documentation navigation.

Extends the atmos-migration agent skill with a construct-by-construct
mapping from Terramate (stack.tm.hcl, globals, generate_hcl,
script{} orchestration, tags/labels, tm_* functions, Terramate Cloud
sync, .tmtriggers) to Atmos stack configuration, wired into the
skill's routing table and resource list.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@atmos-pro

atmos-pro Bot commented Aug 5, 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 Aug 5, 2026
@github-actions github-actions Bot added the size/m Medium size PR label Aug 5, 2026
…gration-skill

# Conflicts:
#	agent-skills/skills/atmos-migration/SKILL.md
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@osterman, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 88c86b35-a001-4c5b-bb35-11849ffce998

📥 Commits

Reviewing files that changed from the base of the PR and between 7ffc91c and 685a8f8.

📒 Files selected for processing (4)
  • agent-skills/skills/atmos-migration/references/from-terramate.md
  • docs/fixes/2026-08-06-provider-mirror-concurrency-test-timing-flake.md
  • pkg/terraform/registry/provider_mirror_test.go
  • website/docs/migration/terramate.mdx
📝 Walkthrough

Walkthrough

The PR adds Terramate-to-Atmos migration guidance to the agent skill and website. It covers construct mappings, migration procedures, parity gaps, CLI equivalents, naming, resources, and documentation navigation.

Changes

Terramate migration documentation

Layer / File(s) Summary
Migration skill routing
agent-skills/AGENTS.md, agent-skills/skills/atmos-migration/SKILL.md
The migration skill now routes Terramate projects and generate_hcl usage to dedicated guidance.
Project and construct mapping
agent-skills/skills/atmos-migration/references/from-terramate.md
The reference maps Terramate stacks, globals, generated HCL, scripts, tags, labels, and functions to Atmos constructs.
Operational migration guidance
agent-skills/skills/atmos-migration/references/from-terramate.md
The reference documents Cloud synchronization, bootstrap flows, triggers, cloning, version pinning, common mistakes, and related skills.
Migration guide concepts and mappings
website/docs/migration/terramate.mdx
The public guide explains directory structures, construct mappings, component conversion, scripts, dependencies, functions, and CLI equivalents.
Migration procedure and validation
website/docs/migration/terramate.mdx
The guide adds migration steps for stacks, modules, backend/provider configuration, workflows, and validation.
Naming and follow-up guidance
website/docs/migration/terramate.mdx
The guide documents stack naming, migration tradeoffs, and follow-up resources.
Documentation navigation
website/docs/learn/next-steps.mdx, website/docs/learn/why-atmos.mdx, website/docs/stacks/name.mdx, website/sidebars.js
The website links to the Terramate guide and adds it to the migration sidebar.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: aknysh

🚥 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 clearly identifies the primary change: adding Terramate migration guidance to the existing atmos-migration skill.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/terramate-migration-skill

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.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.77%. Comparing base (3ce4349) to head (685a8f8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2871   +/-   ##
=======================================
  Coverage   82.76%   82.77%           
=======================================
  Files        1861     1861           
  Lines      180478   180478           
=======================================
+ Hits       149380   149384    +4     
+ Misses      23311    23301   -10     
- Partials     7787     7793    +6     
Flag Coverage Δ
unittests 82.77% <ø> (+<0.01%) ⬆️

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Adds website/docs/migration/terramate.mdx alongside the existing
Terragrunt/Native-Terraform/Terraform-Workspaces guides, covering
stack.tm.hcl, globals, generate_hcl mixins/generators, script{}
orchestration, tags/labels, and Terramate Cloud sync mapped to Atmos
equivalents. Wires it into the sidebar and the other migration-guide
cross-reference lists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions github-actions Bot added size/l Large size PR and removed size/m Medium size PR labels Aug 7, 2026

@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: 7

Caution

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

⚠️ Outside diff range comments (1)
agent-skills/skills/atmos-migration/SKILL.md (1)

24-30: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Link both agent references to the shipped Terramate tutorial.

Both files retain a stale “no tutorial exists” statement even though this PR adds website/docs/migration/terramate.mdx. Remove that statement and link the public guide at /migration/terramate.

  • agent-skills/skills/atmos-migration/SKILL.md#L24-L30: replace the generic migration link and stale claim with the Terramate guide link.
  • agent-skills/skills/atmos-migration/references/from-terramate.md#L3-L7: link the same public guide and keep this file focused on agent decision guidance.
🤖 Prompt for 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.

In `@agent-skills/skills/atmos-migration/SKILL.md` around lines 24 - 30, Update
agent-skills/skills/atmos-migration/SKILL.md lines 24-30 to replace the generic
migration reference and stale “no tutorial yet” claim with a link to
/migration/terramate. Update
agent-skills/skills/atmos-migration/references/from-terramate.md lines 3-7 to
link the same public guide while keeping the file focused on agent decision
guidance.
🤖 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 `@agent-skills/skills/atmos-migration/references/from-terramate.md`:
- Around line 74-78: Update the state-preservation guidance around Terramate’s
stack.id to clarify that it is metadata or a template placeholder, not
necessarily the complete backend key. Instruct users to inspect the frontend
Terramate backend template and set Atmos key/workspace_key_prefix to exactly
match the full existing state path, including prefixes and filenames.
- Around line 130-135: Update the migration guidance to keep
terraform.required_version and terraform.required_providers separate from the
stack-level providers: section. Explain that providers: generates provider
settings in providers_override.tf.json, while the Terraform version and
required-provider constraints belong in terraform.required_version and
terraform.required_providers and generate terraform_override.tf.json; link the
relevant documentation if appropriate.
- Line 37: The dependency-ordering migration row must distinguish prerequisites
from dependents: update the `after = ["tag:x"]` mapping to use
`dependencies.components[].name` or explicit prerequisite selection, and replace
the dependent closure example with a supported form such as `--affected
--include-dependents`; do not imply that `--tags x --include-dependents`
executes prerequisites or that Terraform’s `--include-dependencies` preserves
Terramate ordering.

In `@website/docs/migration/terramate.mdx`:
- Around line 119-124: Revise the filesystem-behavior section to limit the
“directory structure does not influence behavior” claim to configuration
inheritance and merging. Acknowledge that Atmos derives a stack name from the
stack filename basename when name, name_template, and name_pattern are absent,
and that stack names affect CLI selection, dependencies, and Terraform
workspaces. Recommend explicit stack names for migrated Terramate stacks.
- Around line 572-573: Update the Terramate migration example’s Atmos command to
apply the previously generated out.tfplan by passing the plan file to terraform
deploy vpc, preserving saved-plan behavior rather than creating a fresh plan.
- Line 33: Update website/docs/migration/terramate.mdx at lines 33-33, 54-54,
and 135-135: describe a Terramate stack as a directory containing a stack {}
block rather than requiring the stack.tm.hcl filename; retain stack.tm.hcl only
as the conventional filename in examples, and identify the stack {} block as the
stack marker.
- Line 330: Update the Terramate migration mapping in the surrounding workflow
documentation: map PR workflow dispatch to settings.pro.pull_request, drift
checks to settings.pro.drift_detection, and command status reporting to the
--upload-status option. Remove the incorrect mapping of deployment, preview, or
drift behavior to atmos pro commit, and describe atmos pro lock/unlock only as
concurrency controls.

---

Outside diff comments:
In `@agent-skills/skills/atmos-migration/SKILL.md`:
- Around line 24-30: Update agent-skills/skills/atmos-migration/SKILL.md lines
24-30 to replace the generic migration reference and stale “no tutorial yet”
claim with a link to /migration/terramate. Update
agent-skills/skills/atmos-migration/references/from-terramate.md lines 3-7 to
link the same public guide while keeping the file focused on agent decision
guidance.
🪄 Autofix

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 Plus

Run ID: 7b8950a4-1a27-4d9a-b71c-26503c352127

📥 Commits

Reviewing files that changed from the base of the PR and between 3ce4349 and 7ffc91c.

📒 Files selected for processing (8)
  • agent-skills/AGENTS.md
  • agent-skills/skills/atmos-migration/SKILL.md
  • agent-skills/skills/atmos-migration/references/from-terramate.md
  • website/docs/learn/next-steps.mdx
  • website/docs/learn/why-atmos.mdx
  • website/docs/migration/terramate.mdx
  • website/docs/stacks/name.mdx
  • website/sidebars.js

Comment thread agent-skills/skills/atmos-migration/references/from-terramate.md Outdated
Comment thread agent-skills/skills/atmos-migration/references/from-terramate.md Outdated
Comment thread agent-skills/skills/atmos-migration/references/from-terramate.md
Comment thread website/docs/migration/terramate.mdx Outdated
Comment thread website/docs/migration/terramate.mdx Outdated
Comment thread website/docs/migration/terramate.mdx Outdated
Comment thread website/docs/migration/terramate.mdx
Fixes a flaky Windows Acceptance Tests failure: resolving 10 platforms
took 784ms against a 750ms threshold, even though that's nowhere near the
1.5s serial floor the test guards against. Raises the bound to 4/5 of the
serial floor (1200ms) for headroom against normal CI timing variance,
Windows runners especially. No production code changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Distinguish --include-dependencies (prerequisites) from
  --include-dependents (dependents); neither derives ordering from
  tags -- the dependencies.components[].name edge must be declared
  first, closure flags only expand an already-declared graph.
- Clarify Terramate's stack.id is metadata interpolated into a
  generate_hcl backend template, not the full backend key itself;
  migration guidance now says to match the full existing key/path.
- Split providers: (providers_override.tf.json) from
  terraform.required_version/required_providers
  (terraform_override.tf.json) -- they were incorrectly conflated.
- Describe a Terramate stack as a directory containing a stack {}
  block, not requiring the stack.tm.hcl filename specifically.
- Correct the Atmos Pro mapping: PR-triggered dispatch is
  settings.pro.pull_request, drift is settings.pro.drift_detection +
  --upload-status; pro lock/unlock is concurrency control only, pro
  commit is GitHub App commits only -- neither reports deployments.
- Note the terraform deploy example intentionally re-plans rather
  than reusing Terramate's saved out.tfplan, and how to preserve
  saved-plan semantics with --from-plan.
- Correct the stack-basename naming fallback claim to be scoped to
  inheritance/merging, not all runtime behavior.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant