splunk / terraform-provider-victorops

Manage VictorOps teams, users, escalation policies and routing keys using Terraform
Mozilla Public License 2.0
12 stars 11 forks source link

Error: Failed to query available provider packages #9

Open requiem240sx opened 3 years ago

requiem240sx commented 3 years ago

I'm attempting to use modules to create resources. When referencing the module, it doesn't seem to be able to check the version option and gives me an error.

This is the error I'm getting.

Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider
hashicorp/victorops: provider registry registry.terraform.io does not have a
provider named registry.terraform.io/hashicorp/victorops
Cleaning up file based variables

This is the main.tf file

# Install VictorOps Terraform Provider  
terraform {
 required_version = ">= 0.14.2"
}

terraform {
 required_providers {
 victorops = {
  source = "splunk/victorops"
  version = "~> 0.1.1" 
 }
 }
}
 provider "victorops" { 
    api_id  = "<REDACTED>"
  #  api_key = "api_key" Defined in gitlab
 }

If I add the terraform and provider info within the module itself, it seems to be able to work just fine.

I've tested.

If I add the the terraform section within the module itself and it seems to work just fine. Not sure if this is suppose to be like this, but I feel its kind of weird duplicating the code in both the main.tf file as well as the modules maint.tf.