Skip to content

Commit dc066db

Browse files
mbeshjotruon
authored andcommitted
Fix create for all file storage resources to wait for creating state to complete
1 parent 0a99652 commit dc066db

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

oci/file_storage_export_resource.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ func (s *FileStorageExportResourceCrud) Create() error {
218218
}
219219

220220
s.Res = &response.Export
221+
if waitErr := waitForCreatedState(s.D, s); waitErr != nil {
222+
return waitErr
223+
}
224+
221225
return nil
222226
}
223227

oci/file_storage_file_system_resource.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ func (s *FileStorageFileSystemResourceCrud) Create() error {
237237
}
238238

239239
s.Res = &response.FileSystem
240+
if waitErr := waitForCreatedState(s.D, s); waitErr != nil {
241+
return waitErr
242+
}
243+
240244
return nil
241245
}
242246

oci/file_storage_mount_target_resource.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ func (s *FileStorageMountTargetResourceCrud) Create() error {
256256
}
257257

258258
s.Res = &response.MountTarget
259+
if waitErr := waitForCreatedState(s.D, s); waitErr != nil {
260+
return waitErr
261+
}
262+
259263
return nil
260264
}
261265

oci/file_storage_snapshot_resource.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ func (s *FileStorageSnapshotResourceCrud) Create() error {
179179
}
180180

181181
s.Res = &response.Snapshot
182+
if waitErr := waitForCreatedState(s.D, s); waitErr != nil {
183+
return waitErr
184+
}
185+
182186
return nil
183187
}
184188

0 commit comments

Comments
 (0)