From b8753cb9e8337685e509c807143d5783bd7c2593 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 31 May 2023 09:10:47 +0100 Subject: [PATCH] schema/backend: Reflect 1.4 changes in http (#226) --- internal/schema/backends/http.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/internal/schema/backends/http.go b/internal/schema/backends/http.go index cd9818b1..18a954fd 100644 --- a/internal/schema/backends/http.go +++ b/internal/schema/backends/http.go @@ -87,5 +87,24 @@ func httpBackend(v *version.Version) *schema.BodySchema { } } + if v.GreaterThanOrEqual(v1_4_0) { + // https://github.com/hashicorp/terraform/commit/75e5ae27 + bodySchema.Attributes["client_ca_certificate_pem"] = &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A PEM-encoded CA certificate chain used by the client to verify server certificates during TLS authentication."), + } + bodySchema.Attributes["client_certificate_pem"] = &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A PEM-encoded certificate used by the server to verify the client during mutual TLS (mTLS) authentication."), + } + bodySchema.Attributes["client_private_key_pem"] = &schema.AttributeSchema{ + Constraint: schema.LiteralType{Type: cty.String}, + IsOptional: true, + Description: lang.Markdown("A PEM-encoded private key, required if client_certificate_pem is specified."), + } + } + return bodySchema }