Skip to content

Commit bb9db15

Browse files
committed
Add identity creation in the create as well
1 parent 3beeb57 commit bb9db15

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

internal/services/block/snapshot.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ func ResourceBlockSnapshotCreate(ctx context.Context, d *schema.ResourceData, m
151151
}
152152

153153
d.SetId(zonal.NewIDString(zone, snapshot.ID))
154+
diags := applySnapshotIdentity(d, snapshot.ID, zone)
155+
if diags != nil {
156+
return diags
157+
}
154158

155159
_, err = waitForBlockSnapshot(ctx, api, zone, snapshot.ID, d.Timeout(schema.TimeoutCreate))
156160
if err != nil {

internal/services/block/volume.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ func ResourceBlockVolumeCreate(ctx context.Context, d *schema.ResourceData, m an
156156
}
157157

158158
d.SetId(zonal.NewIDString(zone, volume.ID))
159+
diags := applyVolumeIdentity(d, volume.ID, zone)
160+
if diags != nil {
161+
return diags
162+
}
159163

160164
_, err = waitForBlockVolume(ctx, api.BlockAPI, zone, volume.ID, d.Timeout(schema.TimeoutCreate))
161165
if err != nil {

0 commit comments

Comments
 (0)