Skip to content

Commit bb9d434

Browse files
Forcing the terraform provider to use a minimum TLS version of 1.2 when communicating with the APIs (#394)
1 parent 4143a3b commit bb9d434

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

provider/provider.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ func ProviderConfig(d *schema.ResourceData) (clients interface{}, err error) {
258258
)
259259
}
260260

261+
clientOpts = append(clientOpts, baremetal.CustomTransport(
262+
&http.Transport{TLSClientConfig: &tls.Config{MinVersion: tls.VersionTLS12}},
263+
))
264+
261265
if hasKey && privateKeyBuffer != "" {
262266
clientOpts = append(clientOpts, baremetal.PrivateKeyBytes([]byte(privateKeyBuffer)))
263267
} else if hasKeyPath && privateKeyPath != "" {

0 commit comments

Comments
 (0)