terraform-provider-http-client

command module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2022 License: MIT Imports: 3 Imported by: 0

README

HTTP client provider for terraform

A terraform HTTP provider for interacting with HTTP servers. It's an alternative to the hashicorp http provider.

Requirements

Using the Provider

terraform {
  required_providers {
    httpclient = {
      version = "0.0.5"
      source  = "github.com/ragu2k8/http-client"
    }
  }
}

data "httpclient_request" "req" {
  url = "http://httpbin.org/hidden-basic-auth/user/passwd"
  username = "user"
  password = "passwd"
  request_headers = {
    Content-Type: "application/x-www-form-urlencoded",
  }
  request_body = "scope=access"
}

output "response_body" {
  value = jsondecode(data.httpclient_request.req.response_body).authenticated
}

output "response_code" {
  value = data.httpclient_request.req.response_code
}

For detailed usage see provider's documentation page

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL