https://github.com/sbulav/telescope-terraform.nvim
Integration with the terraform CLI
https://github.com/sbulav/telescope-terraform.nvim
lua neovim nvim telescope terraform
Last synced: about 2 months ago
JSON representation
Integration with the terraform CLI
- Host: GitHub
- URL: https://github.com/sbulav/telescope-terraform.nvim
- Owner: sbulav
- License: mit
- Created: 2022-01-14T17:37:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-18T15:40:47.000Z (over 4 years ago)
- Last Synced: 2025-04-06T02:18:14.853Z (about 1 year ago)
- Topics: lua, neovim, nvim, telescope, terraform
- Language: Lua
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telescope-terraform.nvim
[WIP] Integration with terraform CLI
## Installation
### Vim-Plug
```viml
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-terraform.nvim'
```
### Packer
```lua
use {
"nvim-telescope/telescope.nvim",
requires = {
{ "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope-terraform.nvim" },
},
}
```
## Setup and Configuration
```lua
require('telescope').load_extension('terraform')
```
## Usage
```viml
Telescope terraform init
Telescope terraform apply
Telescope terraform destroy
Telescope terraform plan
Telescope terraform plan_targeted
"Using lua function
lua require('telescope').extensions.terraform.init()
lua require('telescope').extensions.terraform.apply()
lua require('telescope').extensions.terraform.destroy()
lua require('telescope').extensions.terraform.plan()
lua require('telescope').extensions.terraform.plan_targeted()
```
## Options
//TODO
## terraform init
[Detail](https://www.terraform.io/cli/commands/init)
| Query | filter |
|---------------|-------------------------------------------------------|
| wincmd | Command to open log window, default = 'botright vnew' |
| wrap | Wrap lines in log window, default = 'nowrap' |
| filetype | Filetype to use on log window, default='bash' |
| timeout | Timeout for sync mode, default = '10000' |
| wait_interval | Wait interval for sync mode, default = '5' |
| mode | Mode to populate log window, default = 'async' |
## terraform apply
[Detail](https://www.terraform.io/cli/commands/apply)
| Query | filter |
|---------------|-------------------------------------------------------|
| wincmd | Command to open log window, default = 'botright vnew' |
| wrap | Wrap lines in log window, default = 'nowrap' |
| filetype | Filetype to use on log window, default='bash' |
| timeout | Timeout for sync mode, default = '10000' |
| wait_interval | Wait interval for sync mode, default = '5' |
| mode | Mode to populate log window, default = 'async' |
## terraform destroy
[Detail](https://www.terraform.io/cli/commands/destroy)
| Query | filter |
|---------------|-------------------------------------------------------|
| wincmd | Command to open log window, default = 'botright vnew' |
| wrap | Wrap lines in log window, default = 'nowrap' |
| filetype | Filetype to use on log window, default='bash' |
| timeout | Timeout for sync mode, default = '10000' |
| wait_interval | Wait interval for sync mode, default = '5' |
| mode | Mode to populate log window, default = 'async' |
## terraform plan
[Detail](https://www.terraform.io/cli/commands/plan)
| Query | filter |
|---------------|-------------------------------------------------------|
| wincmd | Command to open log window, default = 'botright vnew' |
| wrap | Wrap lines in log window, default = 'nowrap' |
| filetype | Filetype to use on log window, default='bash' |
| timeout | Timeout for sync mode, default = '10000' |
| wait_interval | Wait interval for sync mode, default = '5' |
| mode | Mode to populate log window, default = 'async' |
### Key mappings
| key | Usage |
|---------|----------------------------------------------|
| `` | append resource address to the buffer |
| `` | start terraform apply |
| `` | start terraform destroy |
| `` | start terraform init |
## terraform plan_targeted
//TODO
[Detail](https://www.terraform.io/cli/commands/plan)