2014-09-09 22:13:11 +02:00
|
|
|
package digitalocean
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/terraform/helper/schema"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Provider returns a schema.Provider for DigitalOcean.
|
|
|
|
//
|
|
|
|
// NOTE: schema.Provider became available long after the DO provider
|
|
|
|
// was started, so resources may not be converted to this new structure
|
|
|
|
// yet. This is a WIP. To assist with the migration, make sure any resources
|
|
|
|
// you migrate are acceptance tested, then perform the migration.
|
|
|
|
func Provider() *schema.Provider {
|
2014-09-09 22:29:36 +02:00
|
|
|
// TODO: Move the configuration to this
|
2014-09-09 22:13:11 +02:00
|
|
|
|
|
|
|
return &schema.Provider{
|
|
|
|
Schema: map[string]*schema.Schema{
|
|
|
|
"token": &schema.Schema{
|
|
|
|
Type: schema.TypeString,
|
|
|
|
Required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2014-09-09 22:29:36 +02:00
|
|
|
ResourcesMap: map[string]*schema.Resource{
|
2014-09-09 22:42:06 +02:00
|
|
|
"digitalocean_domain": resourceDomain(),
|
2014-09-09 22:29:36 +02:00
|
|
|
"digitalocean_record": resourceRecord(),
|
|
|
|
},
|
2014-09-09 22:13:11 +02:00
|
|
|
}
|
|
|
|
}
|