Skip to content

Error: Failed to query available provider packages #9

@requiem240sx

Description

@requiem240sx

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.

  • Removing the version completely, and attempted adding ~> or the specific version etc...
  • Adding the team directly within the code works fine (just can't do it through a module)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions