No description
  • Go 93.5%
  • HCL 5.8%
  • Makefile 0.7%
Find a file
OpenTofu Core Development Team 36459c6bc8 Apply GitHub workflow changes
2026-03-30 16:35:19 +00:00
.changes Update Changelog for 3.5.0 (#525) 2025-04-23 14:14:57 +02:00
.github Apply GitHub workflow changes 2026-03-30 16:35:19 +00:00
.release Change release tooling to release with HashiCorp CRT (#516) 2025-04-23 13:20:49 +02:00
docs cdktf: update index.md,data-sources/http.md (#523) 2025-04-21 08:27:27 -04:00
examples/data-sources/http Updating docs to include examples of HEAD and POST requests (#179) (#180) 2022-08-24 08:02:33 +01:00
internal/provider build(deps): bump github.com/hashicorp/copywrite from 0.22.0 to 0.24.2 in /tools (#590) 2026-02-06 11:23:02 -05:00
META.d Add catalog metadata (META.d) (#530) 2025-05-13 08:12:58 -04:00
templates Maintain TF >= 0.12 Compatibility with v3.0.0 (#161) 2022-07-27 12:03:10 +01:00
tools build(deps): bump github.com/hashicorp/copywrite in /tools (#605) 2026-03-30 11:08:00 -04:00
version Change release tooling to release with HashiCorp CRT (#516) 2025-04-23 13:20:49 +02:00
.changie.yaml [CI] terraform-devex-repos automation 2024-06-07 16:22:34 -04:00
.copywrite.hcl Add catalog metadata (META.d) (#530) 2025-05-13 08:12:58 -04:00
.golangci.yml SEC-090: Automated trusted workflow pinning (2025-04-07) (#518) 2025-04-09 10:48:35 -05:00
CHANGELOG.md Update Changelog for 3.5.0 (#525) 2025-04-23 14:14:57 +02:00
DESIGN.md all: Bump minimum Go module version to 1.22 (#452) 2024-09-10 07:56:32 -04:00
GNUmakefile Adding tooling for copywrite and files with copyright headers (#275) 2023-06-08 07:26:41 +01:00
go.mod build(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3 (#604) 2026-03-19 10:10:47 -04:00
go.sum build(deps): bump google.golang.org/grpc from 1.79.2 to 1.79.3 (#604) 2026-03-19 10:10:47 -04:00
LICENSE build(deps): bump github.com/hashicorp/copywrite from 0.22.0 to 0.24.2 in /tools (#590) 2026-02-06 11:23:02 -05:00
main.go build(deps): bump github.com/hashicorp/copywrite from 0.22.0 to 0.24.2 in /tools (#590) 2026-02-06 11:23:02 -05:00
README.md chore: Final onboarding to CRT (#528) 2025-04-29 07:24:18 -04:00
terraform-registry-manifest.json Maintain TF >= 0.12 Compatibility with v3.0.0 (#161) 2022-07-27 12:03:10 +01:00

Terraform Provider: HTTP

The HTTP provider interacts with generic HTTP servers. 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. In case of specific questions or discussions, please use the HashiCorp Terraform Providers Discuss forums, in accordance with HashiCorp Community Guidelines.

We also provide:

  • Support page for help when using the provider
  • Contributing guidelines in case you want to help this project
  • Design documentation to understand the scope and maintenance decisions

The remainder of this document will focus on the development aspects of the provider.

Compatibility

Compatibility table between this provider, the Terraform Plugin Protocol version it implements, and Terraform:

HTTP Provider Terraform Plugin Protocol Terraform
>= 2.x 5 >= 0.12
>= 1.1.x, <= 1.2.x 4, 5 >= 0.11
<= 1.0.x 4 <= 0.11

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.

Testing GitHub Actions

This project uses GitHub Actions to realize its CI.

Sometimes it might be helpful to locally reproduce the behaviour of those actions, and for this we use act. Once installed, you can simulate the actions executed when opening a PR with:

# List of workflows for the 'pull_request' action
$ act -l pull_request

# Execute the workflows associated with the `pull_request' action 
$ act pull_request

Releasing

The releasable builds are generated from the build GH workflow and the release/promotion process is completed via internal HashiCorp deployment tooling. Prior to release, the changelog should be updated in main with the changie tool, example:

changie batch 3.7.2 && changie merge

License

Mozilla Public License v2.0