@@ -539,17 +539,16 @@ func ResourceInstanceServerCreate(ctx context.Context, d *schema.ResourceData, m
539539 ///
540540 // Attach Filesystem
541541 ///
542- _ , err = waitForServer ( ctx , api . API , zone , res . Server . ID , d . Timeout ( schema . TimeoutCreate ))
542+
543543 if filesystems , ok := d .GetOk ("filesystems" ); ok {
544- for _ , filesystem := range filesystems .([]interface {} ) {
545- fs := filesystem .(map [string ]interface {} )
544+ for _ , filesystem := range filesystems .([]any ) {
545+ fs := filesystem .(map [string ]any )
546546 filesystemID := fs ["filesystem_id" ]
547547 _ , err := api .AttachServerFileSystem (& instanceSDK.AttachServerFileSystemRequest {
548548 Zone : zone ,
549549 FilesystemID : regional .ExpandID (filesystemID .(string )).ID ,
550550 ServerID : res .Server .ID ,
551551 })
552-
553552 if err != nil {
554553 return nil
555554 }
@@ -1120,8 +1119,8 @@ func ResourceInstanceServerUpdate(ctx context.Context, d *schema.ResourceData, m
11201119 if d .HasChange ("filesystems" ) {
11211120 oldRaw , newRaw := d .GetChange ("filesystems" )
11221121
1123- oldList := oldRaw .([]interface {} )
1124- newList := newRaw .([]interface {} )
1122+ oldList := oldRaw .([]any )
1123+ newList := newRaw .([]any )
11251124
11261125 oldIDs := make (map [string ]struct {})
11271126 newIDs := make (map [string ]struct {})
@@ -1252,6 +1251,7 @@ func attachNewFileSystem(newIDs map[string]struct{}, oldIDs map[string]struct{},
12521251 }
12531252 }
12541253 }
1254+
12551255 return nil , false
12561256}
12571257
@@ -1268,12 +1268,13 @@ func detachOlDFileSystem(oldIDs map[string]struct{}, newIDs map[string]struct{},
12681268 }
12691269 }
12701270 }
1271+
12711272 return nil , false
12721273}
12731274
1274- func collectFilesystemIDs (fsList []interface {} , target map [string ]struct {}) {
1275+ func collectFilesystemIDs (fsList []any , target map [string ]struct {}) {
12751276 for _ , fs := range fsList {
1276- if fsMap , ok := fs .(map [string ]interface {} ); ok {
1277+ if fsMap , ok := fs .(map [string ]any ); ok {
12771278 id := fsMap ["filesystem_id" ].(string )
12781279 target [id ] = struct {}{}
12791280 }
@@ -1319,14 +1320,17 @@ func ResourceInstanceServerDelete(ctx context.Context, d *schema.ResourceData, m
13191320
13201321 // Detach filesystem
13211322 if filesystems , ok := d .GetOk ("filesystems" ); ok {
1322- fsList := filesystems .([]interface {} )
1323+ fsList := filesystems .([]any )
13231324 for i , fsRaw := range fsList {
1324- fsMap := fsRaw .(map [string ]interface {})
1325+ fsMap := fsRaw .(map [string ]any )
1326+
13251327 fsIDRaw , ok := fsMap ["filesystem_id" ]
13261328 if ! ok || fsIDRaw == nil {
13271329 return diag .Errorf ("filesystem_id is missing or nil for filesystem at index %d" , i )
13281330 }
1331+
13291332 fsID := fsIDRaw .(string )
1333+
13301334 newFileSystemID := types .ExpandStringPtr (fsID )
13311335 if newFileSystemID == nil {
13321336 return diag .Errorf ("failed to expand filesystem_id pointer at index %d" , i )
0 commit comments