Skip to content

Utility provider for interacting with generic HTTP servers (with support for binary data as base64 encoded string) as part of a Terraform configuration.

Notifications You must be signed in to change notification settings

ndemeshchenko/terraform-provider-http-bin

Repository files navigation

Terraform Provider: http-bin

The http-bin is a modified copy of a default hashicorp/http provider but this one interacts with generic HTTP servers to download binary data only. It provides a data source that issues an HTTP request exposing the response headers and body for use within a Terraform deployment.

Documentation, questions and discussions

Official documentation on how to use this provider can be found on the Terraform Registry.

Requirements

Development

Building

  1. git clone this repository and cd into its directory
  2. make will trigger the Golang build

The provided GNUmakefile defines additional commands generally useful during development, like for running tests, generating documentation, code formatting and linting. Taking a look at it's content is recommended.

Testing

In order to test the provider, you can run

  • make test to run provider tests
  • make testacc to run provider acceptance tests

It's important to note that acceptance tests (testacc) will actually spawn terraform and the provider. Read more about they work on the official page.

Generating documentation

This provider uses terraform-plugin-docs to generate documentation and store it in the docs/ directory. Once a release is cut, the Terraform Registry will download the documentation from docs/ and associate it with the release version. Read more about how this works on the official page.

Use make generate to ensure the documentation is regenerated with any changes.

Using a development build

If running tests and acceptance tests isn't enough, it's possible to set up a local terraform configuration to use a development builds of the provider. This can be achieved by leveraging the Terraform CLI configuration file development overrides.

First, use make install to place a fresh development build of the provider in your ${GOBIN} (defaults to ${GOPATH}/bin or ${HOME}/go/bin if ${GOPATH} is not set). Repeat this every time you make changes to the provider locally.

Then, setup your environment following these instructions to make your local terraform use your local build.

License

Mozilla Public License v2.0

About

Utility provider for interacting with generic HTTP servers (with support for binary data as base64 encoded string) as part of a Terraform configuration.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published