From 27e1c83c34a1df5296d4b19df6dd6819d26edec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20B=C3=A9rot-Armand?= Date: Fri, 9 Dec 2022 08:42:33 +0000 Subject: [PATCH] Fix snapshot_attributes update --- outscale/resource_outscale_snapshot_attributes.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/outscale/resource_outscale_snapshot_attributes.go b/outscale/resource_outscale_snapshot_attributes.go index df5978165..ce50e3e87 100644 --- a/outscale/resource_outscale_snapshot_attributes.go +++ b/outscale/resource_outscale_snapshot_attributes.go @@ -17,7 +17,6 @@ func resourcedOutscaleOAPISnapshotAttributes() *schema.Resource { Create: resourcedOutscaleOAPISnapshotAttributesCreate, Read: resourcedOutscaleOAPISnapshotAttributesRead, Delete: resourcedOutscaleOAPISnapshotAttributesDelete, - Schema: map[string]*schema.Schema{ "permissions_to_create_volume_additions": { Type: schema.TypeList, @@ -29,10 +28,12 @@ func resourcedOutscaleOAPISnapshotAttributes() *schema.Resource { "account_ids": { Type: schema.TypeList, Optional: true, + ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "global_permission": { Type: schema.TypeBool, + ForceNew: true, Optional: true, }, }, @@ -47,11 +48,13 @@ func resourcedOutscaleOAPISnapshotAttributes() *schema.Resource { "account_ids": { Type: schema.TypeList, Optional: true, + ForceNew: true, Elem: &schema.Schema{Type: schema.TypeString}, }, "global_permission": { Type: schema.TypeBool, Optional: true, + ForceNew: true, }, }, }, @@ -151,6 +154,11 @@ func resourcedOutscaleOAPISnapshotAttributesCreate(d *schema.ResourceData, meta return resourcedOutscaleOAPISnapshotAttributesRead(d, meta) } +func resourceSnapshotAttributesUpdate(d *schema.ResourceData, meta interface{}) error { + + return resourcedOutscaleOAPISnapshotAttributesRead(d, meta) +} + func resourcedOutscaleOAPISnapshotAttributesRead(d *schema.ResourceData, meta interface{}) error { conn := meta.(*OutscaleClient).OSCAPI