mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2025-12-06 07:20:40 +01:00
feat(pulumi): add plugin for Pulumi CLI (#13041)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
This commit is contained in:
41
plugins/pulumi/README.md
Normal file
41
plugins/pulumi/README.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# Pulumi
|
||||||
|
|
||||||
|
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
|
||||||
|
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastucture.
|
||||||
|
|
||||||
|
This plugin provides:
|
||||||
|
|
||||||
|
- 🚀 Short, intuitive aliases for common Pulumi commands
|
||||||
|
- 🎯 Auto-completion support for Pulumi
|
||||||
|
|
||||||
|
To use it, add `pulumi` to the plugins array in your `.zshrc` file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... pulumi)
|
||||||
|
```
|
||||||
|
|
||||||
|
## ⚡ Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
| -------- | ---------------------- | ----------------------------- |
|
||||||
|
| `pul` | `pulumi` | Shortcut for Pulumi CLI |
|
||||||
|
| `pulcs` | `pulumi config set` | Set Pulumi configuration |
|
||||||
|
| `puld` | `pulumi destroy` | Destroy all resources |
|
||||||
|
| `pullog` | `pulumi logs -f` | Tail Pulumi logs in real-time |
|
||||||
|
| `pulp` | `pulumi preview` | Show planned changes |
|
||||||
|
| `pulr` | `pulumi refresh` | Refresh state from cloud |
|
||||||
|
| `puls` | `pulumi stack` | Show stack details |
|
||||||
|
| `pulsh` | `pulumi stack history` | Show stack history |
|
||||||
|
| `pulsi` | `pulumi stack init` | Initialize a new stack |
|
||||||
|
| `pulsl` | `pulumi stack ls` | List available stacks |
|
||||||
|
| `pulso` | `pulumi stack output` | Show stack outputs |
|
||||||
|
| `pulss` | `pulumi stack select` | Switch stack |
|
||||||
|
| `pulu` | `pulumi up` | Deploy infrastructure |
|
||||||
|
|
||||||
|
## 🎯 Autocompletion
|
||||||
|
|
||||||
|
If `pulumi gen-completion zsh` is available, this plugin **automatically loads Pulumi auto-completion**.
|
||||||
|
|
||||||
|
## 🛠️ Contribution
|
||||||
|
|
||||||
|
Feel free to open an issue or PR for improvements! 🚀
|
||||||
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
28
plugins/pulumi/pulumi.plugin.zsh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
if (( ! $+commands[pulumi] )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the completion file doesn't exist yet, we need to autoload it and
|
||||||
|
# bind it to `pulumi`. Otherwise, compinit will have already done that.
|
||||||
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pulumi" ]]; then
|
||||||
|
typeset -g -A _comps
|
||||||
|
autoload -Uz _pulumi
|
||||||
|
_comps[pulumi]=_pulumi
|
||||||
|
fi
|
||||||
|
|
||||||
|
pulumi gen-completion zsh >| "$ZSH_CACHE_DIR/completions/_pulumi" &|
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
alias pul='pulumi'
|
||||||
|
alias pulcs='pulumi config set'
|
||||||
|
alias puld='pulumi destroy'
|
||||||
|
alias pullog='pulumi logs -f'
|
||||||
|
alias pulp='pulumi preview'
|
||||||
|
alias pulr='pulumi refresh'
|
||||||
|
alias puls='pulumi stack'
|
||||||
|
alias pulsh='pulumi stack history'
|
||||||
|
alias pulsi='pulumi stack init'
|
||||||
|
alias pulsl='pulumi stack ls'
|
||||||
|
alias pulso='pulumi stack output'
|
||||||
|
alias pulss='pulumi stack select'
|
||||||
|
alias pulu='pulumi up'
|
||||||
Reference in New Issue
Block a user