diff --git a/tencentcloud/services/tco/resource_tc_identity_center_role_configuration_permission_custom_policy_attachment.go b/tencentcloud/services/tco/resource_tc_identity_center_role_configuration_permission_custom_policy_attachment.go index 656460fcd3..1e1c12fec7 100644 --- a/tencentcloud/services/tco/resource_tc_identity_center_role_configuration_permission_custom_policy_attachment.go +++ b/tencentcloud/services/tco/resource_tc_identity_center_role_configuration_permission_custom_policy_attachment.go @@ -172,9 +172,8 @@ func resourceTencentCloudIdentityCenterRoleConfigurationPermissionCustomPolicyAt } if rolePolicie == nil { - d.SetId("") log.Printf("[WARN]%s resource `identity_center_role_configuration_permission_policy_attachment` [%s] not found, please check if it has been deleted.\n", logId, d.Id()) - return nil + return fmt.Errorf("RolePolicy %s is not exist", d.Id()) } if rolePolicie.RolePolicyName != nil {