Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewbaxter/terraform-provider-localrun
Terraform provider to run commands locally, like builds
https://github.com/andrewbaxter/terraform-provider-localrun
Last synced: about 22 hours ago
JSON representation
Terraform provider to run commands locally, like builds
- Host: GitHub
- URL: https://github.com/andrewbaxter/terraform-provider-localrun
- Owner: andrewbaxter
- License: isc
- Created: 2022-12-28T10:54:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-03T12:37:58.000Z (10 months ago)
- Last Synced: 2024-02-03T13:35:06.809Z (10 months ago)
- Language: Go
- Size: 65.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This provider provides tools for running commands locally.
This provides two options:
- The datasource `Run` executes the command during the `Read` phase, every time you run Terraform (unlike `local-exec` with `null_resource`). This is for things like `Makefile` which should have quick no-op builds.
- The resource `Run` executes the command if any parameters or explicit dependencies change. You can also do this with the `local-run` provisioner, but this can be more convenient.
Both allow you to list file outputs and will calculate the hash for outputs if you need them for another command.
# Installation with Terraform CDK
Run
```
cdktf provider add andrewbaxter/localrun
```# Installation with Terraform
See the dropdown on the Registry page.
# Documentation
See the Registry or look at `docs/`.
# Building
Make sure git submodules are cloned and up to date with `git submodule update --init`.
Run
```
./build.sh
```This will generate the source files and render the docs.
# Technical Details
This uses a fake `_auto_update` attribute which synthetically changes every time the provider's `Read` operation is called, causing Terraform to believe the resource is out of sync and needs an update.