cloudposse/docs/account-map-migration
- community
Checking that the SKILL.md file is still in the repository.
Use when fixing legacy account-map component references or creating new components. Covers migration from dynamic account-map lookups to static account_map variable. Use when you see account-map remote-state references or need to set up provider configuration for a new component.
Install
npx vskill@latest install cloudposse/docs/account-map-migrationSKILL.md
Account Map Migration
This repository has migrated away from the account-map component to use Atmos Auth for authentication. Instead of dynamically looking up account IDs via the account-map component's remote state, we use a static account_map variable defined in stacks/orgs/acme/_defaults.yaml.
Why We Migrated
The legacy account-map component pattern required:
- Deploying account-map component first (chicken-and-egg problem)
- Remote state lookups for every component that needed account IDs
- Complex
providers.tfwith remote-state module calls - Cross-account state access permissions
The new pattern:
- Static account map defined once in stack defaults
- No remote state dependencies for account lookups
- Simpler provider configuration
- Works with Atmos Auth for authentication
Key Configuration
Stack Defaults
The account map is defined in stacks/orgs/acme/_defaults.yaml:
Vendored providers.tf
Components use a vendored providers.tf from Atmos mixins that includes:
account_map_enabledandaccount_mapvariables- Provider configuration that uses the static account map
- Dummy
iam_rolesmodule for legacy compatibility
Vendoring is configured in each component's `component.yaml`:
Key points:
- The upstream
providers.tfis excluded viaexcluded_paths - The
provider-without-account-map.tfmixin is vendored asproviders.tf - This mixin includes the
account_map_enabledandaccount_mapvariables
To vendor (or re-vendor) the component:
The vendored providers.tf handles all account map logic automatically. You don't need to manually add these variables to variables.tf - they're included in providers.tf.
Migration Checklist
When migrating a component or creating a new one:
- Vendor providers.tf - Run
atmos vendor pull -c <component-name>to get the latest providers.tf with account map
support
- Update remote-state.tf - If the component has a
remote-state.tfthat references account-map, update it to use
the bypass pattern (see below)
- Verify catalog - Ensure
account_map_enabled: falseis set (inherited from_defaults.yaml) - Test - Run
atmos terraform planto verify
Bypass Pattern for remote-state.tf
If a component has a remote-state.tf with an account-map lookup, update it to use bypass and defaults:
Key points:
bypass = !var.account_map_enabled- Skips remote state lookup when disableddefaults = var.account_map- Uses the static account_map variable insteadmodule.account_map.outputsworks the same regardless of bypass - returnsdefaultswhen bypassed
Identifying Legacy References
Search for components still using the old pattern:
Reference Implementations
See these components for the current pattern:
components/terraform/vpc/- Standard component with account_mapcomponents/terraform/ecr/- Component with cross-account access
New Components
When creating new components, the migrated pattern is automatic:
- Vendor providers.tf - Run
atmos vendor pull -c <component-name>to get providers.tf with account map support - Inherit stack defaults -
account_map_enabled: falseis inherited from_defaults.yaml - Use Atmos functions - Use
!terraform.statefor cross-component dependencies instead of remote-state.tf
See the developing-components skill for full component creation guidance.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingexamples/snippets/.claude/skills/account-map-migration/SKILL.md
Popularity
- Repository stars
- 94
- Repository forks
- 33
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cloudposse/docs/account-map-migration)