A Neovim plugin that enables efficient navigation and management of Atmos stacks and components directly within your Neovim environment.
Atmos is a powerful infrastructure-as-code (IaC) tool that simplifies the management of cloud resources across multiple environments. It introduces two key concepts:
-
Stacks: Configuration blueprints that describe a cohesive collection of components. Stacks automate the deployment, management, and teardown of Terraform resources, ensuring uniform setups across different environments (e.g.,
development
,staging
,production
). -
Components: The building blocks of your infrastructure. Components define the business logic for provisioning common pieces of infrastructure, such as ECR repositories or EKS clusters.
This plugin enhances your Atmos workflow by providing quick and easy navigation of your Atmos stacks and components within Neovim.
- List and navigate Atmos stacks and components using Telescope
- Validate Atmos stacks directly from Neovim
- Quick access to stack and component definitions
- Seamless integration with your existing Neovim setup
Important
- Neovim 0.8 or later
- Telescope.nvim
- Atmos
1.110.0
or later installed and configured in your system
Using packer.nvim:
use {
'RoseSecurity/atmos.nvim',
requires = {'nvim-telescope/telescope.nvim'}
}
Using vim-plug:
Plug 'nvim-telescope/telescope.nvim'
Plug 'RoseSecurity/atmos.nvim'
For other package managers, please refer to their respective documentation for adding plugins.
Add the following to your Neovim configuration:
require("atmos").setup({
base_path = "<ATMOS_BASE_PATH>",
config_path = "<ATMOS_CLI_CONFIG>"
})
These correspond to the ATMOS_CLI_CONFIG_PATH
environment variable, which is where to find atmos.yaml
. It's the path to a folder where atmos.yaml
CLI config file is located. The ATMOS_BASE_PATH
is the base path to components and stacks folders.
The plugin provides two main commands:
-
:AtmosListStacks
- Opens a Telescope picker listing all available Atmos stacks
-
:AtmosListComponents
- Opens a Telescope picker listing all available Atmos components
- Selecting a component will navigate you to the component directory
-
:AtmosListVariables
- Opens a Telescope picker with all available stacks
- After selecting the stack, a list of components for the stack will appear
- Once the component for the stack is selected, the variables and values will be displayed
-
:AtmosValidateStacks
- Validate Atmos stack manifest configurations
You can map these commands to key bindings for quicker access. For example:
vim.api.nvim_set_keymap('n', '<leader>als', ':AtmosListStacks<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>alc', ':AtmosListComponents<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>alv', ':AtmosListVariables<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<leader>av', ':AtmosValidateStacks<CR>', { noremap = true, silent = true })