hashicorp / terraform-provider-http

Utility provider for interacting with generic HTTP servers as part of a Terraform configuration.
https://registry.terraform.io/providers/hashicorp/http/latest
Mozilla Public License 2.0
206 stars 116 forks source link

Feature: Add HTTPS Resource Request #300

Open srikanth2302 opened 1 year ago

srikanth2302 commented 1 year ago

Terraform CLI and Provider Versions

Terraform CLI Version: v1.3.6 Provider Version: 3.4.0

Use Cases or Problem Statement

I Would like to have a http resource request so that terraform can perform the Post Operation only if Attributes of the resource changed. DataSource is continuously performing POST Request which is not required.

Proposal

Something like below `

resource "http" "Post_Request" {
  name         = "vault-mount"
  url          = "https://localhost:8200/v1/sys/mounts/"
  method       = "POST"
  request_body = <<EOF
{
  "type": "aws",
  "config": {
    "force_no_cache": true
  }
}

EOF

  headers = {
    X-Vault-Token = "xxx"
  }
}

How much impact is this issue causing?

High

Additional Information

No response

Code of Conduct

bendbennett commented 1 year ago

Hi @srikanth2302 👋

Thank you for raising this issue. We will leave this issue open and prioritise looking into this further on the basis of the level of community interest that is expressed.

Related: #241

ShubhamKumar977 commented 1 year ago

Hi @bendbennett

I think this would be a good feature

Terraform CLI and Provider Versions

Terraform CLI Version: v1.3.6 Provider Version: 3.4.0

Use Cases or Problem Statement

I Would like to have a http resource request so that terraform can perform the Post Operation only if Attributes of the resource changed. DataSource is continuously performing POST Request which is not required.

Proposal

Something like below `

resource "http" "Post_Request" {
  name         = "vault-mount"
  url          = "https://localhost:8200/v1/sys/mounts/"
  method       = "POST"
  request_body = <<EOF
{
  "type": "aws",
  "config": {
    "force_no_cache": true
  }
}

EOF

  headers = {
    X-Vault-Token = "xxx"
  }
}

How much impact is this issue causing?

High

Additional Information

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Hi @bendbennett,

It would be good to have this as a resource. Can you please prioritize this enhancement.

bendbennett commented 1 year ago

Hi @ShubhamKumar977 👋

Could you signal your interest in this issue by adding a 👍 to https://github.com/hashicorp/terraform-provider-http/issues/300#issue-1818585213. Thanks!

varshith1212 commented 1 year ago

Hi @bendbennett

This seems to be a reasonable request, I also have a use case not to execute data source, and having a resource would suit the requirement that we are trying to achieve... Can you prioritize this enhancement?

srikanth2302 commented 1 year ago

@bendbennett -- Any Update on this request?