I created a custom provider to use an internal API used for generating approved names for resources according to our standard. I wrote it with Go, but when I'm testing it, I'm getting an error saying:
Error: meaningful_resource_name.server_name: Provider doesn't support resource: meaningful_resource_name
Here's the test tf file I'm using:
resource "meaningful_resource_name" "server_name" {
<... parameters ...>
}
output "server_name" {
value = "${meaningful_resource_name.server_name.name}"
}
And this is the provider.go file:
package meaningful
import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform/terraform"
)
func Provider() terraform.ResourceProvider {
return &schema.Provider{
Schema: map[string]*schema.Schema{},
ResourcesMap: map[string]*schema.Resource{
"meaningful_resource_name": meaningfulName(),
},
DataSourcesMap: map[string]*schema.Resource{},
}
}
I already created a provider using this same structure, but I don't understand why it's not recognizing it. Any clues?
I'm using Go v1.10.4 and Terraform v0.11.10