Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brandonkal/pulumi-command
A Pulumi resource provider for running commands
https://github.com/brandonkal/pulumi-command
pulumi
Last synced: about 2 months ago
JSON representation
A Pulumi resource provider for running commands
- Host: GitHub
- URL: https://github.com/brandonkal/pulumi-command
- Owner: brandonkal
- License: apache-2.0
- Created: 2019-12-04T01:46:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T21:08:48.000Z (over 1 year ago)
- Last Synced: 2024-10-12T17:44:45.829Z (2 months ago)
- Topics: pulumi
- Language: Go
- Homepage:
- Size: 222 KB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pulumi - `brandonkal/pulumi-command` - A simple Pulumi provider that allows one to run arbitrary commands and treat their outputs as a resource (Providers / Miscellaneous)
README
# pulumi-resource-command
This is a simple Pulumi provider that allows one to run arbitrary commands and treat their outputs as a resource. With this, anything can be done in a Pulumi program.
It is important to ensure that the output of a command is deterministic. If it is not, use the diff command to ensure the net results are deterministic. The output of the update and and create commands should remain the same (not just the command effects). See the examples for usage details.
## Usage
See [./examples](./examples) folder for examples of plugin usage for available runtimes.
> Note: `python` and `nodejs` runtimes will pull required plugin binaries automatically, for `dotnet` and `go` runtimes check [Installation](#Installation) instruction below
## Installation
Find available versions on [releases](https://github.com/brandonkal/pulumi-command/releases) page and install prebuild plugin with this command:
```sh
pulumi plugin install resource command v --server https://github.com/brandonkal/pulumi-command/releases/download/v/
```To build and install plugin from source you can do this:
1. Checkout this repo
2. Run this commands:```sh
make provider
make install
```## Developing
### Pre-requisites
Install the `pulumictl` cli from the [releases](https://github.com/pulumi/pulumictl/releases) page or follow the [install instructions](https://github.com/pulumi/pulumictl#installation)
> NB: Usage of `pulumictl` is optional. If not using it, hard code the version in the [Makefile](Makefile) of when building explicitly pass version as `VERSION=0.0.1 make build`
### Build and Test
```bash
# build and install the resource provider plugin
$ make build install
# test
$ cd examples/simple
$ npm install
$ pulumi stack init test
$ pulumi up
```## Attribution
Thank you to [Luke Hoban](https://github.com/lukehoban) for his help answering my Pulumi questions on Slack.
© Brandon Kalinowski. Apache-2.0.