helper/schema: ensure ForceNew set when Update is not

If a given resource does not define an `Update` function, then all of
its attributes must be specified as `ForceNew`, lest Applys fail with
"doesn't support update" like #1367.

This is something we can detect automatically, so this adds a check for
it when we validate provider implementations.
This commit is contained in:
Paul Hinze 2015-04-03 09:57:30 -05:00
parent 52b43d550a
commit 952af7ad20

View File

@ -75,6 +75,7 @@ func resourceComputeRoute() *schema.Resource {
"tags": &schema.Schema{
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: func(v interface{}) int {
return hashcode.String(v.(string))