opentofu/terraform/schemas_test.go
Kristin Laemmert 80ab551867
terraform: use addrs.Provider as map keys for provider schemas (#24002)
This is a stepping-stone PR for the provider source project. In this PR
"legcay-stype" FQNs are created from the provider name string. Future
work involves encoding the FQN directly in the AbsProviderConfig and
removing the calls to addrs.NewLegacyProvider().
2020-02-03 08:18:04 -05:00

20 lines
482 B
Go

package terraform
import (
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/configs/configschema"
)
func simpleTestSchemas() *Schemas {
provider := simpleMockProvider()
provisioner := simpleMockProvisioner()
return &Schemas{
Providers: map[addrs.Provider]*ProviderSchema{
addrs.NewLegacyProvider("test"): provider.GetSchemaReturn,
},
Provisioners: map[string]*configschema.Block{
"test": provisioner.GetSchemaResponse.Provisioner,
},
}
}