mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-06 18:51:13 +00:00
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:
parent
52b43d550a
commit
952af7ad20
@ -75,6 +75,7 @@ func resourceComputeRoute() *schema.Resource {
|
|||||||
"tags": &schema.Schema{
|
"tags": &schema.Schema{
|
||||||
Type: schema.TypeSet,
|
Type: schema.TypeSet,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
ForceNew: true,
|
||||||
Elem: &schema.Schema{Type: schema.TypeString},
|
Elem: &schema.Schema{Type: schema.TypeString},
|
||||||
Set: func(v interface{}) int {
|
Set: func(v interface{}) int {
|
||||||
return hashcode.String(v.(string))
|
return hashcode.String(v.(string))
|
||||||
|
Loading…
Reference in New Issue
Block a user