Skip to content

Commit d6abfc8

Browse files
committed
Assert role permission update is in-place
1 parent a89725c commit d6abfc8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cloudstack/resource_cloudstack_role_permission_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ func testAccCheckCloudStackRolePermissionExists(n string, rolePermission *clouds
8383

8484
for _, rp := range l.RolePermissions {
8585
if rp.Id == rs.Primary.ID {
86+
if rolePermission.Id != "" && rolePermission.Id != rp.Id {
87+
return fmt.Errorf("Role Permission was recreated (old ID: %s, new ID: %s)", rolePermission.Id, rp.Id)
88+
}
89+
8690
*rolePermission = *rp
8791
return nil
8892
}

0 commit comments

Comments
 (0)