From 65cbb996504b8aef0d715ad1e4224880cf9c33da Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 2 Dec 2017 17:13:52 -0800 Subject: [PATCH] terraform: fix validation issues --- cmd/terraform-provider-route/main.go | 2 +- cmd/terraform-provider-route/route.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/terraform-provider-route/main.go b/cmd/terraform-provider-route/main.go index 9bef4e9..88534f1 100644 --- a/cmd/terraform-provider-route/main.go +++ b/cmd/terraform-provider-route/main.go @@ -25,7 +25,7 @@ func provider() terraform.ResourceProvider { Schema: map[string]*schema.Schema{ "token": &schema.Schema{ Type: schema.TypeString, - Optional: false, + Optional: true, DefaultFunc: schema.EnvDefaultFunc("ROUTE_TOKEN", nil), }, "host": &schema.Schema{ diff --git a/cmd/terraform-provider-route/route.go b/cmd/terraform-provider-route/route.go index 1c2ab5b..10eb74a 100644 --- a/cmd/terraform-provider-route/route.go +++ b/cmd/terraform-provider-route/route.go @@ -22,6 +22,7 @@ func routeResource() *schema.Resource { "domain": { Type: schema.TypeString, Required: false, + ForceNew: true, }, }, }