terraform: fix validation issues

This commit is contained in:
Cadey Ratio 2017-12-02 17:13:52 -08:00
parent 8b57a92533
commit 65cbb99650
2 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,7 @@ func provider() terraform.ResourceProvider {
Schema: map[string]*schema.Schema{ Schema: map[string]*schema.Schema{
"token": &schema.Schema{ "token": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
Optional: false, Optional: true,
DefaultFunc: schema.EnvDefaultFunc("ROUTE_TOKEN", nil), DefaultFunc: schema.EnvDefaultFunc("ROUTE_TOKEN", nil),
}, },
"host": &schema.Schema{ "host": &schema.Schema{

View File

@ -22,6 +22,7 @@ func routeResource() *schema.Resource {
"domain": { "domain": {
Type: schema.TypeString, Type: schema.TypeString,
Required: false, Required: false,
ForceNew: true,
}, },
}, },
} }