Skip to content

Add Custom CA Bundle to terraform cli #28551

Description

@lmmart

Hi there,

Current Terraform Version

Terraform v0.15.1

Use-cases

I am using a SSL Intercepting Proxy.

I have an issue only with terraform init command :

 
 Could not retrieve the list of available versions for provider hashicorp/azurerm: could not connect to registry.terraform.io: Failed
 to request discovery document: Get "https://registry.terraform.io/.well-known/terraform.json": x509: certificate signed by unknown
 authority

Others commands like terraform apply, terraform destroy which are using aws sdk/cli works fine with the use of env var AWS_CA_BUNDLE

Attempted Solutions

  • Install custom CA Root in system bundle. But that's not what i want.
  • Use NO_PROXY=registry.terraform.io

Proposal

Use an env var to add custom CA Bundle to terraform cli, like AWS_CA_BUNDLE for aws cli.

References

#21632

EDIT : Using env var SSL_CERT_FILE works

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions