MeilleursAgents / terraform-provider-ansiblevault

Read ansible vault from Terraform
https://registry.terraform.io/providers/MeilleursAgents/ansiblevault/latest
MIT License
76 stars 19 forks source link

Errormessage at terraform init on CentOS #121

Closed fmu282 closed 2 years ago

fmu282 commented 2 years ago

Describe the bug Error message at terraform init :: Error: Failed to query available provider packages

To Reproduce Steps to reproduce the behavior:

  1. Download and execute the installaton script
  2. Add example code to terraform project
  3. Execute terraform init
  4. Error message appears

Expected behavior I would like to use my ansible vault file for storing common secrets between ansible and terraform.

Environment (please complete the following information):

Additional context

terraform init

Initializing the backend...

Initializing provider plugins...
- Reusing previous version of hashicorp/azurerm from the dependency lock file
- Finding latest version of hashicorp/ansiblevault...
- Using previously-installed hashicorp/azurerm v2.77.0
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/ansiblevault: provider registry
│ registry.terraform.io does not have a provider named registry.terraform.io/hashicorp/ansiblevault
│
│ 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/ansiblevault, run the following command:
│     terraform providers
╵
fmu282 commented 2 years ago

Hi there, the problem is solved - no bug. It was a mistake of mine... I simply do not know that a provider must be added.

terraform {
  required_providers {
    ansiblevault = {
      source = "MeilleursAgents/ansiblevault"
      version = "2.2.0"
    }
  }
}

provider "ansiblevault" {
  # Configuration options
}