Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devops-rob/terraform-provider-terracurl
A flexible Terraform provider for making API calls
https://github.com/devops-rob/terraform-provider-terracurl
api api-rest http terracurl terraform terraform-provider
Last synced: about 1 month ago
JSON representation
A flexible Terraform provider for making API calls
- Host: GitHub
- URL: https://github.com/devops-rob/terraform-provider-terracurl
- Owner: devops-rob
- License: mpl-2.0
- Created: 2022-06-20T15:12:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T10:32:41.000Z (6 months ago)
- Last Synced: 2024-08-02T00:26:31.294Z (4 months ago)
- Topics: api, api-rest, http, terracurl, terraform, terraform-provider
- Language: Go
- Homepage: https://www.hashicorp.com/blog/writing-terraform-for-unsupported-resources
- Size: 181 KB
- Stars: 125
- Watchers: 5
- Forks: 9
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-tf - terraform-provider-terracurl - Provider to make managed and unmanaged API calls to your target endpoint. (Providers / Community providers)
README
# Terraform Provider TerraCurl
Available in the [Terraform Registry.](https://registry.terraform.io/providers/devops-rob/terracurl/latest/docs)
This provider is designed to be a flexible extension of your terraform code to make managed and unamanged API calls to your target endpoint. Platform native providers should be preferred to TerraCurl but for instances where the platform provider does not have a resource or data source that you require, TerraCurl can be used to make substitute API calls.
## Managed API calls
When using TerraCurl, if the API call is creating a change on the target platform and you would like this change reversed upon a destroy, use the `terracurl_request` resource. This will allow you to enter the API call that should be run when `terraform destroy` is run.```hcl
resource "terracurl_request" "mount" {
name = "vault-mount"
url = "https://localhost:8200/v1/sys/mounts/aws"
method = "POST"
request_body = <= 0.13.x
- [Go](https://golang.org/doc/install) >= 1.17## Building The Provider
1. Clone the repository
1. Enter the repository directory
1. Build the provider using the Go `install` command:
```sh
$ go install
```## Adding Dependencies
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
Please see the Go documentation for the most up to date information about using Go modules.To add a new dependency `github.com/author/dependency` to your Terraform provider:
```
go get github.com/author/dependency
go mod tidy
```Then commit the changes to `go.mod` and `go.sum`.
## Developing the Provider
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (see [Requirements](#requirements) above).
To compile the provider, update the makefile with your OS architecture, then run `make install`. This will build the provider and put the provider binary in the `~/.terraform.d/plugins/local/` directory.
To generate or update documentation, run `make docs`.
In order to run the full suite of Acceptance tests, run `make test`.
*Note:* Acceptance tests create real resources, and often cost money to run.
```sh
$ make test
```