there is an error happend when I configure tf file as follow picture. I want to use nginx to share provider in an internal network environment
Hi @781058829,
This message seems to suggest that your serveri’s service discovery URL (the /.well-known/terraform.json
content) did not return a successful HTTP request containing a valid JSON document.
You could perhaps simulate the request that Terraform made using a command like this:
curl -v https://localhost/.well-known/terraform.json
However, if your goal is to create a local source for existing providers inside your local network then implementing a provider registry is not the right approach for that. Instead, you should implement a provider network mirror, which is a server you can use as an alternative installation source for providers from any registry.
The difference between a mirror and a registry is that a registry defines its own namespace – provider addresses start with that registry’s hostname – whereas a mirror just acts as a local copy of providers without changing their namespace. You can use a provider mirror to host a local copy of hashicorp/azurerm
(whose full name is actually registry.terraform.io/hashicorp/azurerm
) so that you won’t need to specify a different source address in your required_providers
block.
This is what I really need , I will try this way , too much thanks ,