Getting error below when trying to create terraform-bundle package
$ /home/docker/go/bin/terraform-bundle package -os=linux -arch=amd64 terraform-bundle.hcl
Failed to read config: At 9:13: root.providers.azurerm[0]: unknown type for string *ast.ObjectType
terraform {
version = "0.12.28"
}
providers {
azurerm = ["~>2.20.0"]
random = ["~>2.3"]
restapi = ["1.14.0"]
}
and now getting no provider exists with the given name error:
$ /home/docker/go/bin/terraform-bundle package -os=linux -arch=amd64 -plugin-dir=./plugins/github.com/Mastercard/1.14.0/linux_amd64/ terraform-bundle.hcl
Fetching Terraform 0.12.28 core package...
Fetching 3rd party plugins in directory: ./plugins/github.com/Mastercard/1.14.0/linux_amd64/
plugin: restapi-v1.14.0 (0.0.0)
- Resolving "azurerm" provider (~>2.20.0)...
- Checking for provider plugin on https://releases.hashicorp.com...
- Downloading plugin for provider "azurerm" (hashicorp/azurerm) 2.20.0...
- Resolving "random" provider (~>2.3)...
- Checking for provider plugin on https://releases.hashicorp.com...
- Downloading plugin for provider "random" (hashicorp/random) 2.3.0...
- Resolving "restapi" provider (1.14.0)...
- Checking for provider plugin on https://releases.hashicorp.com...
- Failed to resolve restapi provider 1.14.0: no provider exists with the given name
I keep the provider like this:
$ ls plugins/github.com/Mastercard/1.14.0/linux_amd64/terraform-provider-restapi-v1.14.0
plugins/github.com/Mastercard/1.14.0/linux_amd64/terraform-provider-restapi-v1.14.0
Was looking through my search console for some issues and noticed this backlink to original post. I’m stoked that someone benefited from that walk through and I wasn’t talking into the void .