cloud-ca / terraform-provider-cloudca

Terraform provider for cloud.ca
https://cloud.ca
MIT License
8 stars 10 forks source link

Providers compatibility with Terraform >= 0.13: explicit provider source location #90

Open ab-a opened 3 years ago

ab-a commented 3 years ago

Description

According to Hashicorp documentation: Prior versions of Terraform have supported automatic provider installation only for providers packaged and distributed by HashiCorp. Providers built by the community have previously required manual installation by extracting their distribution packages into specific local filesystem locations.

Terraform v0.13 introduces a new hierarchical namespace for providers that allows specifying both HashiCorp-maintained and community-maintained providers as dependencies of a module, with community providers distributed from other namespaces on Terraform Registry from a third-party provider registry.

In order to establish the hierarchical namespace, Terraform now requires explicit source information for any providers that are not HashiCorp-maintained, using a new syntax in the required_providers nested block inside the terraform configuration block.

https://www.terraform.io/upgrade-guides/0-13.html

Actual Behavior

When you try to run Terraform with the cloudca driver on latest Terraform version, we have this error:

│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/cloudca: provider registry registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/cloudca
│
│ All modules should specify their required_providers so that external consumers will get the correct providers when using a module. To see which modules are currently depending on hashicorp/cloudca, run the following command:
│     terraform providers
|

Expected Behavior

Terraform should load the external provider.

Replication Case

  1. Download the cloud.ca Terraform provider binary for your OS from the releases page.
  2. Copy the provider to the plugin directory ~/.terraform.d/plugins.
  3. Run Terraform

Environment